From: mfranz Date: Sat, 23 May 2009 07:32:29 +0000 (+0000) Subject: segfault-- X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ad302db9a8fea0be318678a97e887a075df6de2c;p=simgear.git segfault-- --- diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index 17524d6a..dda15a92 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -68,7 +68,7 @@ SGModelLib::loadModel(const string &path, osg::Node *n = readNodeFile(path, opt.get()); if(data) data->modelLoaded(path, data->getProperties(), n); - if (n->getName().empty()) + if (n && n->getName().empty()) n->setName("Direct loaded model \"" + path + "\""); return n;