Don't load materials without a name

This commit is contained in:
torsten
2009-08-21 15:55:23 +00:00
committed by Tim Moore
parent e782adef94
commit d0821953bb

View 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;