From 3bdfecb0ed61118fa39955454c82e1bc889c333a Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Fri, 24 Feb 2023 13:26:34 +0200 Subject: [PATCH] Destroy mapPivot nodes as we go --- code/AssetLib/LWO/LWOLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/AssetLib/LWO/LWOLoader.cpp b/code/AssetLib/LWO/LWOLoader.cpp index 7a09b60a2..a44c1dc96 100644 --- a/code/AssetLib/LWO/LWOLoader.cpp +++ b/code/AssetLib/LWO/LWOLoader.cpp @@ -597,8 +597,9 @@ void LWOImporter::GenerateNodeGraph(std::map &apcNodes) { } //Merge pivot map into node map - for (auto itMapPivot = mapPivot.begin(); itMapPivot != mapPivot.end(); ++itMapPivot) { + for (auto itMapPivot = mapPivot.begin(); itMapPivot != mapPivot.end();) { apcNodes[itMapPivot->first] = itMapPivot->second; + itMapPivot = mapPivot.erase(itMapPivot); } }