Merge pull request #2669 from theakman2/issue_2668
Fix: Mismatched new/free in gltf2 importer (fixes #2668)pull/2663/head^2
commit
a75fc4563a
|
@ -1036,7 +1036,7 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl
|
||||||
delete[] values;
|
delete[] values;
|
||||||
} else if (node.translation.isPresent) {
|
} else if (node.translation.isPresent) {
|
||||||
anim->mNumPositionKeys = 1;
|
anim->mNumPositionKeys = 1;
|
||||||
anim->mPositionKeys = new aiVectorKey();
|
anim->mPositionKeys = new aiVectorKey[anim->mNumPositionKeys];
|
||||||
anim->mPositionKeys->mTime = 0.f;
|
anim->mPositionKeys->mTime = 0.f;
|
||||||
anim->mPositionKeys->mValue.x = node.translation.value[0];
|
anim->mPositionKeys->mValue.x = node.translation.value[0];
|
||||||
anim->mPositionKeys->mValue.y = node.translation.value[1];
|
anim->mPositionKeys->mValue.y = node.translation.value[1];
|
||||||
|
|
Loading…
Reference in New Issue