From e3fb793a8a6d4bab58e68c54736a655e2373b78c Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 11 Mar 2010 21:55:37 +0000 Subject: (svn r19388) -Fix [FS#3666]: [NoAI] When reloading a savegame, an AI failing to compile could trigger (trying) to read the not yet loaded information of another AI via the AI Debug window and its "open with the most recently used AI" feature --- src/ai/ai_gui.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ai/ai_gui.cpp') diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index beeed22bc..c7ff796d9 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1016,3 +1016,11 @@ void ShowAIDebugWindow(CompanyID show_company) ShowErrorMessage(STR_ERROR_AI_DEBUG_SERVER_ONLY, INVALID_STRING_ID, WL_INFO); } } + +/** + * Reset the AI windows to their initial state. + */ +void InitializeAIGui() +{ + AIDebugWindow::ai_debug_company = INVALID_COMPANY; +} -- cgit v1.2.3-54-g00ecf