From b47c5c8c27b0fc3174eb4a9f30d86bdfeb962097 Mon Sep 17 00:00:00 2001 From: FRICOTEAUX Date: Mon, 30 Nov 2020 20:11:41 +0100 Subject: [PATCH] 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") --- code/AssetLib/glTF2/glTF2Exporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/glTF2/glTF2Exporter.cpp b/code/AssetLib/glTF2/glTF2Exporter.cpp index 872543ef2..637808877 100644 --- a/code/AssetLib/glTF2/glTF2Exporter.cpp +++ b/code/AssetLib/glTF2/glTF2Exporter.cpp @@ -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 newMeshRef = mAsset->meshes.Get(meshIndex - 1);