Explorar o código

Fix regression on FBX importer unit test

box.fbx was broken since b28bcc commit.
Alexandre Avenel %!s(int64=7) %!d(string=hai) anos
pai
achega
de8adacb54
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      code/FBXMeshGeometry.cpp

+ 3 - 0
code/FBXMeshGeometry.cpp

@@ -437,6 +437,9 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
     // deal with this more elegantly and with less redundancy, but right
     // now it seems unavoidable.
     if (MappingInformationType == "ByVertice" && isDirect) {
+        if (!HasElement(source, indexDataElementName)) {
+            return;
+        }
         std::vector<T> tempData;
 		ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));