From: dmv Date: Tue, 25 Aug 2009 08:31:07 +0000 (+0000) Subject: IPAL21340 Compute leads to Unknown Exception if No available data in selection. X-Git-Tag: V5_1_3rc1~105 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=0913edc2fcc4e8ab13b97cf76a6b10499b5d1681 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 fc143d84d..087c102df 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -651,7 +651,7 @@ void SMESHGUI_BaseComputeOp::startOperation() tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_NO_AVAILABLE_DATA")); onCancel(); - + return; } myMainShape = myMesh->GetShapeToMesh(); @@ -676,9 +676,11 @@ void SMESHGUI_BaseComputeOp::computeMesh() bool computeFailed = true, memoryLack = false; _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh); + if ( !aMeshSObj ) // IPAL 21340 + 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();