]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
If items removed from outside and removed from map then map iterator in destructor...
authorstv <stv@opencascade.com>
Tue, 10 Jan 2006 14:23:32 +0000 (14:23 +0000)
committerstv <stv@opencascade.com>
Tue, 10 Jan 2006 14:23:32 +0000 (14:23 +0000)
src/Qtx/QtxResourceEdit.cxx

index e1c9e75385e796378ffc6c01600bbeda76e1fb1d..e499236ff9fa1af7dc748fc0aca2c358ea1e1ee0 100644 (file)
@@ -35,8 +35,13 @@ QtxResourceEdit::QtxResourceEdit( QtxResourceMgr* mgr )
 
 QtxResourceEdit::~QtxResourceEdit()
 {
+  ItemMap items;
   for ( ItemMap::ConstIterator it = myItems.begin(); it != myItems.end(); ++it )
-    delete it.data();
+    items.insert( it.key(), it.data() );
+
+  for ( ItemMap::ConstIterator itr = items.begin(); itr != items.end(); ++itr )
+    if ( myItems.contains( itr.key() ) )
+      delete itr.data();
 }
 
 QtxResourceMgr* QtxResourceEdit::resourceMgr() const