]> git.mxchange.org Git - simgear.git/commitdiff
Don't load materials without a name
authortorsten <torsten>
Fri, 21 Aug 2009 15:55:23 +0000 (15:55 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 23 Aug 2009 19:37:03 +0000 (21:37 +0200)
simgear/scene/tgdb/apt_signs.cxx

index 311f0c2f49f1132e517aae892e305b9d4530d31b..83529475731634bd116ba849b18ed231357b683e 100644 (file)
@@ -215,11 +215,11 @@ SGMakeSign(SGMaterialLib *matlib, const string& path, const string& content)
             }
         }
 
-        SGMaterial *material = NULL;
 
-        if (newmat.size()) {
-            material = matlib->find(newmat);
-        }
+        if (newmat.size() == 0 )
+          continue;
+
+        SGMaterial *material = matlib->find(newmat);
         if (!material) {
             SG_LOG(SG_TERRAIN, SG_ALERT, SIGN "ignoring unknown material `" << newmat << '\'');
             continue;