]> git.mxchange.org Git - flightgear.git/commitdiff
Fix indentation and use naIsNil to determine if _globals is nil
authorRichard Harrison <rjh@zaretto.com>
Sun, 29 Nov 2015 18:15:24 +0000 (19:15 +0100)
committerRichard Harrison <rjh@zaretto.com>
Sun, 29 Nov 2015 18:15:24 +0000 (19:15 +0100)
src/Cockpit/od_gauge.cxx
src/Scripting/NasalSys.cxx

index dfb5617a3f9381f7e78282afd42f52561115dbc5..4b18fed38d2e6592cf04f48adacc5bca0abc40ee 100644 (file)
@@ -127,9 +127,9 @@ class ReplaceStaticTextureVisitor:
       simgear::EffectGeode* eg = dynamic_cast<simgear::EffectGeode*>(&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;
index 59a50867a8f29060f19d4604d74aa6c565010e57..6355d64f24ffacc027f3fd242d318171c8c37605 100644 (file)
@@ -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);