Closedown crash prevention
This commit is contained in:
parent
475166643c
commit
9ba892962c
2 changed files with 7 additions and 3 deletions
|
@ -127,8 +127,10 @@ class ReplaceStaticTextureVisitor:
|
||||||
simgear::EffectGeode* eg = dynamic_cast<simgear::EffectGeode*>(&node);
|
simgear::EffectGeode* eg = dynamic_cast<simgear::EffectGeode*>(&node);
|
||||||
if( !eg )
|
if( !eg )
|
||||||
return;
|
return;
|
||||||
|
simgear::Effect* eff = eg->getEffect();
|
||||||
osg::StateSet* ss = eg->getEffect()->getDefaultStateSet();
|
if (!eff)
|
||||||
|
return;
|
||||||
|
osg::StateSet* ss = eff->getDefaultStateSet();
|
||||||
if( !ss )
|
if( !ss )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1165,7 +1165,9 @@ bool FGNasalSys::createModule(const char* moduleName, const char* fileName,
|
||||||
naRef locals;
|
naRef locals;
|
||||||
naRef modname = naNewString(ctx);
|
naRef modname = naNewString(ctx);
|
||||||
naStr_fromdata(modname, (char*)moduleName, strlen(moduleName));
|
naStr_fromdata(modname, (char*)moduleName, strlen(moduleName));
|
||||||
if(!naHash_get(_globals, modname, &locals))
|
if (!((_globals).ref).ptr.obj)
|
||||||
|
return false;
|
||||||
|
if (!naHash_get(_globals, modname, &locals))
|
||||||
locals = naNewHash(ctx);
|
locals = naNewHash(ctx);
|
||||||
|
|
||||||
_cmdArg = (SGPropertyNode*)cmdarg;
|
_cmdArg = (SGPropertyNode*)cmdarg;
|
||||||
|
|
Loading…
Add table
Reference in a new issue