]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
In ~GEOM_Engine(), prevent from SIGSEGV after closing the first document
authoreap <eap@opencascade.com>
Fri, 27 Jul 2012 16:06:43 +0000 (16:06 +0000)
committereap <eap@opencascade.com>
Fri, 27 Jul 2012 16:06:43 +0000 (16:06 +0000)
src/GEOM/GEOM_Engine.cxx

index cc284959899b3c6d8c5b285dbfd65abf269ba376..6efcaf7e0bfc958888502b5ec90cba9beaf9fa50 100644 (file)
@@ -244,8 +244,10 @@ GEOM_Engine::~GEOM_Engine()
   Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
 #endif
   for (; anItr.More(); anItr.Next())
+  {
     Close(anItr.Key());
-
+    anItr.Initialize( _mapIDDocument ); // anItr becomes invalid at _mapIDDocument.UnBind(docId)
+  }
   _mapIDDocument.Clear();
   _objects.Clear();
 }