Invent a property root if not given in the options struct.

Modified Files:
	simgear/scene/model/SGReaderWriterXML.cxx
This commit is contained in:
frohlich
2009-06-03 19:30:35 +00:00
committed by Tim Moore
parent 2fb8e32104
commit 9d0bad29c0

View File

@@ -79,7 +79,7 @@ SGReaderWriterXML::readNode(const std::string& fileName,
= dynamic_cast<const SGReaderWriterXMLOptions*>(options);
string fg_root;
SGPropertyNode *prop_root=0;
SGSharedPtr<SGPropertyNode> prop_root;
osg::Node *(*load_panel)(SGPropertyNode *)=0;
SGModelData *model_data=0;
SGPath externalTexturePath;
@@ -89,6 +89,9 @@ SGReaderWriterXML::readNode(const std::string& fileName,
load_panel = xmlOptions->getLoadPanel();
model_data = xmlOptions->getModelData();
}
if (!prop_root) {
prop_root = new SGPropertyNode;
}
fg_root=osgDB::Registry::instance()->getDataFilePathList().front();