Bläddra i källkod

Some FBX files have Null/LimbNode attributes with an empty Properties70 element, where the Element is not NULL, but it's Compound is. The code only checked if the Element itself is NULL, thus causing a DeadlyImportError when trying to instantiate a PropertyTable for an Element that doesn't have a Compound.

Max Vollmer 7 år sedan
förälder
incheckning
0b02b92701
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      code/FBXDocumentUtil.cpp

+ 1 - 1
code/FBXDocumentUtil.cpp

@@ -115,7 +115,7 @@ std::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
         }
     }
 
-    if(!Properties70) {
+    if(!Properties70 || !Properties70->Compound()) {
         if(!no_warn) {
             DOMWarning("property table (Properties70) not found",&element);
         }