From: jfa Date: Tue, 31 Jan 2006 15:57:29 +0000 (+0000) Subject: Fix bug 11419: CRASH after trying to import MED file in Post-Pro module. X-Git-Tag: T_merge_to_HEAD_20060207~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=635b8ce06cccaa1d89d3781156fabd034c118688;p=modules%2Fgui.git Fix bug 11419: CRASH after trying to import MED file in Post-Pro module. --- diff --git a/src/SalomeApp/SalomeApp_DataModel.cxx b/src/SalomeApp/SalomeApp_DataModel.cxx index aeda19d4c..81db7b490 100644 --- a/src/SalomeApp/SalomeApp_DataModel.cxx +++ b/src/SalomeApp/SalomeApp_DataModel.cxx @@ -247,7 +247,8 @@ void SalomeApp_DataModel::update( LightApp_DataObject*, LightApp_Study* study ) } } } - updateTree( sobj, aSStudy ); + if ( sobj && aSStudy ) + updateTree( sobj, aSStudy ); } //================================================================ @@ -256,7 +257,7 @@ void SalomeApp_DataModel::update( LightApp_DataObject*, LightApp_Study* study ) //================================================================ SUIT_DataObject* SalomeApp_DataModel::synchronize( const _PTR( SComponent )& sobj, SalomeApp_Study* study ) { - if( !study || !study->root() ) + if( !study || !study->root() || !sobj ) return 0; DataObjectList ch; study->root()->children( ch );