]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0021165: [CEA] Unit test crashes salome session
authoreap <eap@opencascade.com>
Wed, 2 Feb 2011 12:07:09 +0000 (12:07 +0000)
committereap <eap@opencascade.com>
Wed, 2 Feb 2011 12:07:09 +0000 (12:07 +0000)
   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

index ee458a24b705239752c0de49862f65b20a37e027..0b6c411dbc7192f0b19c3cf08a057c4f41546d6f 100644 (file)
@@ -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 );