Explorar o código

alloc-dealloc-mismatch

Mike Samsonov %!s(int64=6) %!d(string=hai) anos
pai
achega
9adc4e87fa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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];