]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #418: crash on object remove master_20140820
authorasl <asl@opencascade.com>
Tue, 19 Aug 2014 04:47:20 +0000 (04:47 +0000)
committerasl <asl@opencascade.com>
Tue, 19 Aug 2014 04:47:20 +0000 (04:47 +0000)
src/HYDROGUI/HYDROGUI_DataModelSync.cxx

index 36405be28d475db41d61584166853f7f80a1ce5a..5f148e9a50660c1c37b78d2c20d88467c3e00216 100644 (file)
@@ -17,12 +17,8 @@ void HYDROGUI_DataModelSync::deleteItemWithChildren( const suitPtr& theSuitPtr )
   if( !theSuitPtr )
     return;
 
-  DataObjectList aChildren;
-  theSuitPtr->children( aChildren );
-  foreach( SUIT_DataObject* anObj, aChildren )
-    deleteItemWithChildren( anObj );
-
-  delete theSuitPtr;
+  theSuitPtr->setAutoDeleteChildren( true );
+  theSuitPtr->deleteLater();
 }
 
 suitPtr HYDROGUI_DataModelSync::nullSrc() const