Parcourir la source

alloc-dealloc-mismatch

Mike Samsonov il y a 6 ans
Parent
commit
9adc4e87fa
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      code/glTF2/glTF2Importer.cpp

+ 1 - 1
code/glTF2/glTF2Importer.cpp

@@ -1041,7 +1041,7 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl
         delete[] values;
     } else if (node.rotation.isPresent) {
         anim->mNumRotationKeys = 1;
-        anim->mRotationKeys = new aiQuatKey();
+        anim->mRotationKeys = new aiQuatKey[anim->mNumRotationKeys];
         anim->mRotationKeys->mTime = 0.f;
         anim->mRotationKeys->mValue.x = node.rotation.value[0];
         anim->mRotationKeys->mValue.y = node.rotation.value[1];