- fbx: better error reporting reading property tables.

This commit is contained in:
Alexander Gessler
2012-08-25 19:53:46 +02:00
parent c9facf16fa
commit 4921114c7d
5 changed files with 25 additions and 11 deletions

View File

@@ -318,14 +318,13 @@ void Document::ReadGlobalSettings()
DOMError("no GlobalSettings dictionary found");
}
const Element* Properties70 = (*ehead->Compound())["Properties70"];
if(!Properties70) {
boost::shared_ptr<const PropertyTable> props = GetPropertyTable(*this, "", *ehead, *ehead->Compound(), true);
if(!props) {
DOMError("GlobalSettings dictionary contains no property table");
}
globals.reset(new FileGlobalSettings(*this, boost::make_shared<const PropertyTable>(
*Properties70,boost::shared_ptr<const PropertyTable>(static_cast<const PropertyTable*>(NULL))
)));
globals.reset(new FileGlobalSettings(*this, props));
}