From: eap Date: Wed, 26 Jan 2005 09:01:26 +0000 (+0000) Subject: Prevent exception at shape selection if no mesh was pre-selected X-Git-Tag: V2_2_0b2~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=72598d17882a440afe96df9731407ce1bf241c70;p=modules%2Fsmesh.git Prevent exception at shape selection if no mesh was pre-selected --- diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index aa3a15cbd..a83f360b5 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -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 )) {