]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_init.cxx
Reset, fix Nasal timers added on shutdown.
[flightgear.git] / src / Main / fg_init.cxx
index cdba3a14483ac2dc1e2823b6f0255896eadf141d..3abb334601472843151010de39fdc7721254706f 100644 (file)
@@ -948,6 +948,13 @@ void fgStartNewReset()
     fgSetBool("/sim/freeze/master", true);
     
     SGSubsystemMgr* subsystemManger = globals->get_subsystem_mgr();
+    // Nasal is manually inited in fgPostInit, ensure it's already shutdown
+    // before other subsystems, so Nasal listeners don't fire during shutdonw
+    SGSubsystem* nasal = subsystemManger->get_subsystem("nasal");
+    nasal->shutdown();
+    nasal->unbind();
+    subsystemManger->remove("nasal");
+    
     subsystemManger->shutdown();
     subsystemManger->unbind();