1
0
Fork 0

check if the "nasal" subsystem is still there, and only call <unload> then.

This isn't the case if the model is destroyed on fgfs exit. To make <unload>
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.
This commit is contained in:
mfranz 2006-03-09 13:30:28 +00:00
parent c386f00312
commit b9d3c3ccb6

View file

@ -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));