From: vsr Date: Fri, 15 Oct 2010 09:27:53 +0000 (+0000) Subject: Fix SIGSEGV in destructor of GEOM_Engine. X-Git-Tag: V5_1_5rc1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=481b82fcad0fb28f4d32763b8333acc7a9b2484f;p=modules%2Fgeom.git Fix SIGSEGV in destructor of GEOM_Engine. --- diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index d33196f76..f3607e52f 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -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())