From ad302db9a8fea0be318678a97e887a075df6de2c Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 23 May 2009 07:32:29 +0000 Subject: [PATCH] segfault-- --- simgear/scene/model/modellib.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5