]> git.mxchange.org Git - flightgear.git/commit
remove util.cxx workaround for listener-call-at-exit-segfault, and make
authormfranz <mfranz>
Tue, 1 May 2007 17:03:50 +0000 (17:03 +0000)
committermfranz <mfranz>
Tue, 1 May 2007 17:03:50 +0000 (17:03 +0000)
commitac0f49a9290d5c496f764936e701cdb8d7f0927d
tree11fa0daf1cc64b40821adf777a2f446b9f6c459a
parent83418376d710e93a294c51d731703f0074feb4cd
remove util.cxx workaround for listener-call-at-exit-segfault, and make
NasalSys.cxx more robust instead. The reason for the crash was that during
fgfs shutdown destroyed subsystems (GENERAL group) still need Nasal access
(for AI Model destruction listeners), but at that point globals->get_subsystem()
can't even deliver the "nasal" subsystem (INIT group). One way to solve that
problem would have been to replace  globals->get_subsystem("nasal") by
globals->get_subsystem_mgr()->get_group(SGSubsystemMgr::INIT)->get_subsystem("nasal"),
but Andy decided to store a pointer to the active "nasal" subsysten in
NasalSys.cxx instead, as the "nasal" subsystem needs to be accessed in
every single Nasal extension function, and multiple "nasal" subsystems are
out of the question, anyway.
src/Main/util.cxx
src/Scripting/NasalSys.cxx