From 957a59e57a7be92fd64a0c1278a6f04d0f31d327 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 23 Oct 2010 19:09:08 +0100 Subject: [PATCH] Investigating an intermittent shutdown crash; fix deletion of AIManager. --- src/Main/globals.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index ee5fcf2fd..33f36ecc8 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -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; -- 2.39.5