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")

pull/3515/head
FRICOTEAUX 2020-11-30 20:11:41 +01:00
parent 9ae112309f
commit b47c5c8c27
1 changed files with 1 additions and 1 deletions

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);