From: azv Date: Wed, 6 Dec 2017 07:39:31 +0000 (+0300) Subject: Issue #2337: crash when Undo Insert a Folder before X-Git-Tag: V_2.10.0RC~93^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9a4e7cab209b8329ebf8f54f37bbb22c63bc1af8;p=modules%2Fshaper.git 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. --- 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); } }