X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ComputeDlg.cxx;h=5023cdc54a45dca90ba09a108c1f847912253ab4;hb=e6a2527b2254b1931fa7aa7f55526cdf689c6229;hp=fc143d84df665b546e0583e9e40ce14e2fce7be4;hpb=40b2818f18601091d81e0d9d749a3fd6808c31ce;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index fc143d84d..5023cdc54 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(); @@ -1164,6 +1166,8 @@ SMESHGUI_ComputeOp::~SMESHGUI_ComputeOp() void SMESHGUI_ComputeOp::startOperation() { SMESHGUI_BaseComputeOp::startOperation(); + if (myMesh->_is_nil()) + return; computeMesh(); } @@ -1266,6 +1270,8 @@ void SMESHGUI_PrecomputeOp::startOperation() } SMESHGUI_BaseComputeOp::startOperation(); + if (myMesh->_is_nil()) + return; // disconnect slot from preview dialog to have Apply from results of compute operation only disconnect( myDlg, SIGNAL( dlgOk() ), this, SLOT( onOk() ) ); @@ -1645,6 +1651,8 @@ void SMESHGUI_EvaluateOp::startOperation() { SMESHGUI_BaseComputeOp::evaluateDlg(); SMESHGUI_BaseComputeOp::startOperation(); + if (myMesh->_is_nil()) + return; evaluateMesh(); } @@ -1662,7 +1670,7 @@ LightApp_Dialog* SMESHGUI_EvaluateOp::dlg() const //================================================================================ /*! - * \brief evaluaateMesh() + * \brief evaluateMesh() */ //================================================================================ @@ -1679,9 +1687,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();