]> git.mxchange.org Git - simgear.git/commitdiff
segfault--
authormfranz <mfranz>
Sat, 23 May 2009 07:32:29 +0000 (07:32 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 2 Jun 2009 22:08:04 +0000 (00:08 +0200)
simgear/scene/model/modellib.cxx

index 17524d6a0efb596978a62960c6b06a4c73d84bc9..dda15a92c5832cb7fccac67738118ad0ebac38e4 100644 (file)
@@ -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;