]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix SIGSEGV in destructor of GEOM_Engine.
authorvsr <vsr@opencascade.com>
Fri, 15 Oct 2010 09:27:53 +0000 (09:27 +0000)
committervsr <vsr@opencascade.com>
Fri, 15 Oct 2010 09:27:53 +0000 (09:27 +0000)
src/GEOM/GEOM_Engine.cxx

index d33196f76e5e6e7ce52682ecd005f556251f4ab3..f3607e52fbda125c5083aecf2c187472533e6de5 100644 (file)
@@ -189,10 +189,12 @@ GEOM_Engine::GEOM_Engine()
 GEOM_Engine::~GEOM_Engine()
 {
   GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
+  std::list< Handle(GEOM_Object) > objs;
   for(; It.More(); It.Next())
-    {
-      RemoveObject(Handle(GEOM_Object)::DownCast(It.Value()));
-    }
+    objs.push_back( Handle(GEOM_Object)::DownCast(It.Value()) );
+  std::list< Handle(GEOM_Object) >::iterator objit;
+  for(objit = objs.begin(); objit != objs.end(); ++objit)
+    RemoveObject(*objit);
 
   //Close all documents not closed
   for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())