From 9a4e7cab209b8329ebf8f54f37bbb22c63bc1af8 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 6 Dec 2017 10:39:31 +0300 Subject: [PATCH] Issue #2337: crash when Undo Insert a Folder before Reinitialize folders iterator each time any folder is removed from the map of labels and corresponding folders. --- src/Model/Model_Objects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 3a933410b..1308ec27f 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -898,6 +898,8 @@ void Model_Objects::synchronizeFeatures( // unbind after the "erase" call: on abort sketch // is removes sub-objects that corrupts aFIter myFolders.UnBind(aFldIt.Key()); + // reinitialize iterator because unbind may corrupt the previous order in the map + aFldIt.Initialize(myFolders); } } -- 2.39.2