From: torsten Date: Fri, 21 Aug 2009 15:55:23 +0000 (+0000) Subject: Don't load materials without a name X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d0821953bbf51f02b962468e8f080258eedfe6c0;p=simgear.git Don't load materials without a name --- diff --git a/simgear/scene/tgdb/apt_signs.cxx b/simgear/scene/tgdb/apt_signs.cxx index 311f0c2f..83529475 100644 --- a/simgear/scene/tgdb/apt_signs.cxx +++ b/simgear/scene/tgdb/apt_signs.cxx @@ -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;