# HG changeset patch # User yexo # Date 2009-05-14 18:09:50 # Node ID 0fcd189c6880cc65382156ea5801da51355ee615 # Parent 26267db0dfb08b1a2c6b0781c6cc1db09c6dca3f (svn r16306) -Fix [FS#2901] (r15027): Close all windows before unloading the AI system as closing the content-download window will rescan for AIs diff --git a/src/openttd.cpp b/src/openttd.cpp --- 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();