From: eap Date: Wed, 2 Feb 2011 12:07:09 +0000 (+0000) Subject: 0021165: [CEA] Unit test crashes salome session X-Git-Tag: V6_3_0a1~71 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=93002a427ec69acb963a49eeb7b05d8542336a63;p=modules%2Fgui.git 0021165: [CEA] Unit test crashes salome session In notifyObserverID(), check if SObject returned by GetFatherComponent() is valid or not - if ( aSComp->GetID() == entry_str ) + if ( aSComp && !aSComp->IsNull() && aSComp->GetID() == entry_str ) --- diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index ee458a24b..0b6c411db 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -86,7 +86,7 @@ public: { // It's probably a SComponent _PTR(SComponent) aSComp = obj->GetFatherComponent(); - if ( aSComp->GetID() == entry_str ) + if ( aSComp && !aSComp->IsNull() && aSComp->GetID() == entry_str ) suit_obj = new SalomeApp_ModuleObject( aSComp ); else suit_obj = new SalomeApp_DataObject( obj );