diff --git a/simgear/scene/model/SGReaderWriterXML.cxx b/simgear/scene/model/SGReaderWriterXML.cxx index 17f23bc7..6dbb42fc 100644 --- a/simgear/scene/model/SGReaderWriterXML.cxx +++ b/simgear/scene/model/SGReaderWriterXML.cxx @@ -215,8 +215,11 @@ sgLoad3DModel_internal(const SGPath& path, SGPath texturepath(path); SGPath modelDir(modelpath.dir()); - SGSharedPtr prop_root = options->getPropertyNode(); - if (!prop_root.valid()) + SGSharedPtr prop_root; + if (options->getPropertyNode().valid() && + options->getPropertyNode()->getRootNode()) + prop_root = options->getPropertyNode()->getRootNode(); + else prop_root = new SGPropertyNode; osg::ref_ptr data = options->getModelData();