From 93002a427ec69acb963a49eeb7b05d8542336a63 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 2 Feb 2011 12:07:09 +0000 Subject: [PATCH] 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 ) --- src/SalomeApp/SalomeApp_Study.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); -- 2.39.2