From: mfranz Date: Thu, 9 Mar 2006 13:30:28 +0000 (+0000) Subject: check if the "nasal" subsystem is still there, and only call then. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b9d3c3ccb6070024400034817b734fa1ea8387bd;p=flightgear.git check if the "nasal" subsystem is still there, and only call then. This isn't the case if the model is destroyed on fgfs exit. To make work under these circumstances, one would have to reorder subsystem removal, but this doesn't seem overly useful, so we'll do it when we really need it. --- diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 7e8cba465..486f5a189 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -697,6 +697,9 @@ FGNasalModelData::~FGNasalModelData() return; FGNasalSys *nas = (FGNasalSys *)globals->get_subsystem("nasal"); + if (!nas) + return; + if (_unload) { const char *s = _unload->getStringValue(); nas->createModule(_module.c_str(), _module.c_str(), s, strlen(s));