From: Richard Harrison Date: Sun, 29 Nov 2015 18:15:24 +0000 (+0100) Subject: Fix indentation and use naIsNil to determine if _globals is nil X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0368e9a003329e3dcab3b160b057215b765beb19;p=flightgear.git Fix indentation and use naIsNil to determine if _globals is nil --- diff --git a/src/Cockpit/od_gauge.cxx b/src/Cockpit/od_gauge.cxx index dfb5617a3..4b18fed38 100644 --- a/src/Cockpit/od_gauge.cxx +++ b/src/Cockpit/od_gauge.cxx @@ -127,9 +127,9 @@ class ReplaceStaticTextureVisitor: simgear::EffectGeode* eg = dynamic_cast(&node); if( !eg ) return; - simgear::Effect* eff = eg->getEffect(); - if (!eff) - return; + simgear::Effect* eff = eg->getEffect(); + if (!eff) + return; osg::StateSet* ss = eff->getDefaultStateSet(); if( !ss ) return; diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 59a50867a..6355d64f2 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -1165,8 +1165,8 @@ bool FGNasalSys::createModule(const char* moduleName, const char* fileName, naRef locals; naRef modname = naNewString(ctx); naStr_fromdata(modname, (char*)moduleName, strlen(moduleName)); - if (!((_globals).ref).ptr.obj) - return false; + if (naIsNil(_globals)) + return false; if (!naHash_get(_globals, modname, &locals)) locals = naNewHash(ctx);