From: asl Date: Tue, 19 Aug 2014 04:47:20 +0000 (+0000) Subject: refs #418: crash on object remove X-Git-Tag: master_20140820 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3528d6aeb67cdc47f28060b7cd1aafcef00a1611;p=modules%2Fhydro.git refs #418: crash on object remove --- diff --git a/src/HYDROGUI/HYDROGUI_DataModelSync.cxx b/src/HYDROGUI/HYDROGUI_DataModelSync.cxx index 36405be2..5f148e9a 100644 --- a/src/HYDROGUI/HYDROGUI_DataModelSync.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModelSync.cxx @@ -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