changeset 11906:e56f17f057fe draft

(svn r16306) -Fix [FS#2901] (r15027): Close all windows before unloading the AI system as closing the content-download window will rescan for AIs
author yexo <yexo@openttd.org>
date Thu, 14 May 2009 18:09:50 +0000
parents fe3085dd504b
children ae4ef10e7535
files src/openttd.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -300,9 +300,6 @@
  */
 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 @@
 
 	UnInitWindowSystem();
 
+	/* stop the AI */
+	AI::Uninitialize(false);
+
 	/* Uninitialize airport state machines */
 	UnInitializeAirports();