From: dmv Date: Tue, 15 Sep 2009 13:25:02 +0000 (+0000) Subject: IPAL21340 Compute leads to Unknown Exception if No available data in selection. X-Git-Tag: V5_1_3rc1~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ab21216f1082e998eb09bbb5a990a860978cf302;p=modules%2Fsmesh.git IPAL21340 Compute leads to Unknown Exception if No available data in selection. --- diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index aef920ec4..ed2c5311f 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -1681,9 +1681,12 @@ void SMESHGUI_BaseComputeOp::evaluateMesh() SMESH::long_array_var aRes; _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh); + if ( !aMeshSObj ) // IPAL21340 + return; + bool hasShape = myMesh->HasShapeToMesh(); bool shapeOK = myMainShape->_is_nil() ? !hasShape : hasShape; - if ( shapeOK && aMeshSObj ) + if ( shapeOK ) { myCompDlg->myMeshName->setText( aMeshSObj->GetName().c_str() ); SMESH::SMESH_Gen_var gen = getSMESHGUI()->GetSMESHGen();