From 53c6cc096634392b3cc23c12bbdf7e8f4ddce2ad Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Fri, 24 Feb 2023 13:19:38 +0200 Subject: [PATCH] Add a scope so mapPivot is destroyed when no longer used --- code/AssetLib/LWO/LWOLoader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/AssetLib/LWO/LWOLoader.cpp b/code/AssetLib/LWO/LWOLoader.cpp index 1a3cf4e1a..9d76d6bc7 100644 --- a/code/AssetLib/LWO/LWOLoader.cpp +++ b/code/AssetLib/LWO/LWOLoader.cpp @@ -565,6 +565,7 @@ void LWOImporter::GenerateNodeGraph(std::map &apcNodes) { root->mName.Set(""); //Set parent of all children, inserting pivots + { std::map mapPivot; for (auto itapcNodes = apcNodes.begin(); itapcNodes != apcNodes.end(); ++itapcNodes) { @@ -599,6 +600,7 @@ void LWOImporter::GenerateNodeGraph(std::map &apcNodes) { for (auto itMapPivot = mapPivot.begin(); itMapPivot != mapPivot.end(); ++itMapPivot) { apcNodes[itMapPivot->first] = itMapPivot->second; } + } //Set children of all parents apcNodes[(uint16_t)-1] = root;