From: Mathias Froehlich Date: Thu, 22 Mar 2012 07:38:16 +0000 (+0100) Subject: scenery: Use correct property root in xml loading. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=986d2cc42a94d558687be7c52027a9123551b676;p=simgear.git scenery: Use correct property root in xml loading. Really query for the root node when loading xml files. This should fix http://code.google.com/p/flightgear-bugs/issues/detail?id=714 --- 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();