]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Prevent exception at shape selection if no mesh was pre-selected
authoreap <eap@opencascade.com>
Wed, 26 Jan 2005 09:01:26 +0000 (09:01 +0000)
committereap <eap@opencascade.com>
Wed, 26 Jan 2005 09:01:26 +0000 (09:01 +0000)
src/SMESHGUI/SMESHGUI_GroupDlg.cxx

index aa3a15cbda1887e3e11e2447ed10742f8f422f19..a83f360b5c664175e151c595341b5dc8699de69e 100644 (file)
@@ -797,7 +797,11 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
        SALOMEDS::SObject_var aGroupMainShapeSO = aStudy->FindObjectIOR( aStudy->ConvertObjectToIOR(aGroupMainShape) );
        // The mesh SObject
        SALOMEDS::SObject_var aMeshSO = aStudy->FindObjectIOR( aStudy->ConvertObjectToIOR(myMesh) );
-       
+        if ( aMeshSO->_is_nil() ) {
+          myGeomGroup = GEOM::GEOM_Object::_nil();
+          busy = false;
+          return;
+        }
        SALOMEDS::SObject_var anObj, aRef;
        bool isRefOrSubShape = false;
        if ( aMeshSO->FindSubObject( 1, anObj ) &&  anObj->ReferencedObject( aRef )) {