summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-05-14 18:09:50 +0000
committeryexo <yexo@openttd.org>2009-05-14 18:09:50 +0000
commit203cd6c2ddf4fe6853d0a72d280640e10579918c (patch)
tree169e5ca591278f5ec5a05bdfb9b65d249d4005dc
parenta5d6e23e9d2c3752e2a059325ed67026c0ebdfdb (diff)
downloadopenttd-203cd6c2ddf4fe6853d0a72d280640e10579918c.tar.xz
(svn r16306) -Fix [FS#2901] (r15027): Close all windows before unloading the AI system as closing the content-download window will rescan for AIs
-rw-r--r--src/openttd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 701db0dc6..1aed1c566 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -300,9 +300,6 @@ static void InitializeDynamicVariables()
*/
static void ShutdownGame()
{
- /* stop the AI */
- AI::Uninitialize(false);
-
IConsoleFree();
if (_network_available) NetworkShutDown(); // Shut down the network and close any open connections
@@ -311,6 +308,9 @@ static void ShutdownGame()
UnInitWindowSystem();
+ /* stop the AI */
+ AI::Uninitialize(false);
+
/* Uninitialize airport state machines */
UnInitializeAirports();