From 0368e9a003329e3dcab3b160b057215b765beb19 Mon Sep 17 00:00:00 2001 From: Richard Harrison Date: Sun, 29 Nov 2015 19:15:24 +0100 Subject: [PATCH] Fix indentation and use naIsNil to determine if _globals is nil --- src/Cockpit/od_gauge.cxx | 6 +++--- src/Scripting/NasalSys.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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); -- 2.39.5