From 635b8ce06cccaa1d89d3781156fabd034c118688 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 31 Jan 2006 15:57:29 +0000 Subject: [PATCH] Fix bug 11419: CRASH after trying to import MED file in Post-Pro module. --- src/SalomeApp/SalomeApp_DataModel.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ); -- 2.39.2