From 986d2cc42a94d558687be7c52027a9123551b676 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Thu, 22 Mar 2012 08:38:16 +0100 Subject: [PATCH] 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 --- simgear/scene/model/SGReaderWriterXML.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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(); -- 2.39.5