glTF2Exporter: fix crash when exporting a scene with several meshes per node (regression coming from commit e8d2b84 on 08/03/2020 "clean all warnings for vs-2019")

This commit is contained in:
FRICOTEAUX
2020-11-30 20:11:41 +01:00
parent 9ae112309f
commit b47c5c8c27
+1 -1
View File
@@ -1126,7 +1126,7 @@ void glTF2Exporter::MergeMeshes()
unsigned int meshIndex = meshRef.GetIndex();
if (meshIndex == removedIndex) {
node->meshes.erase(curNode->meshes.begin() + mm);
curNode->meshes.erase(curNode->meshes.begin() + mm);
} else if (meshIndex > removedIndex) {
Ref<Mesh> newMeshRef = mAsset->meshes.Get(meshIndex - 1);