Fix crash if GS is removed when GS settings window is open

This commit is contained in:
Jonathan G Rennison
2022-10-18 22:02:15 +01:00
parent 1341666807
commit 3e0475b920

View File

@@ -192,6 +192,7 @@ struct AIListWindow : public Window {
DeleteWindowByClass(WC_QUERY_STRING);
InvalidateWindowClassesData(WC_TEXTFILE);
if (_game_mode == GM_NORMAL && slot == OWNER_DEITY) {
DeleteWindowByClass(WC_AI_SETTINGS);
InvalidateWindowData(WC_AI_DEBUG, 0, -1);
SetWindowClassesDirty(WC_AI_DEBUG);
}