Salome HOME
0020310: EDF 997 SMESH : Tell the mesh to pass through different points
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.cxx
index fc143d84df665b546e0583e9e40ce14e2fce7be4..ed2c5311f6896ef028dfe1fe9aa0db665696d321 100644 (file)
@@ -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();
@@ -1662,7 +1664,7 @@ LightApp_Dialog* SMESHGUI_EvaluateOp::dlg() const
 
 //================================================================================
 /*!
- * \brief evaluaateMesh()
+ * \brief evaluateMesh()
 */
 //================================================================================
 
@@ -1679,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();