1
0
Fork 0

Investigating an intermittent shutdown crash; fix deletion of AIManager.

This commit is contained in:
James Turner 2010-10-23 19:09:08 +01:00
parent 3bf1551c18
commit 957a59e57a

View 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;