return;
FGNasalSys *nas = (FGNasalSys *)globals->get_subsystem("nasal");
+ if (!nas) {
+ SG_LOG(SG_NASAL, SG_ALERT, "Trying to run an <unload> script "
+ "without Nasal subsystem present.");
+ return;
+ }
+
if (_unload) {
const char *s = _unload->getStringValue();
nas->createModule(_module.c_str(), _module.c_str(), s, strlen(s));