]> git.mxchange.org Git - flightgear.git/commitdiff
Investigating an intermittent shutdown crash; fix deletion of AIManager.
authorJames Turner <zakalawe@mac.com>
Sat, 23 Oct 2010 18:09:08 +0000 (19:09 +0100)
committerJames Turner <zakalawe@mac.com>
Sat, 23 Oct 2010 18:09:08 +0000 (19:09 +0100)
src/Main/globals.cxx

index ee5fcf2fdcd800e9a31ea9d6310e708fe60ec47f..33f36ecc82501c3e6d49984b4d4b98d62f087970 100644 (file)
@@ -166,8 +166,9 @@ FGGlobals::~FGGlobals()
     // deallocation of AIModel objects. To ensure we can safely
     // shut down all subsystems, make sure we take down the 
     // AIModels system first.
-    subsystem_mgr->get_group(SGSubsystemMgr::GENERAL)->remove_subsystem("ai_model");
-
+    SGSubsystem* ai = subsystem_mgr->remove("ai_model");
+    delete ai;
+    
     subsystem_mgr->unbind();
     delete subsystem_mgr;