Salome HOME
refs #550: fix crash when myObject is NULL
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileInterpolateOp.cxx
index fd2932ae3881aff41206a27da18a98f420b8f79c..3bfb229203d426a8ee7b993b66ac36ad8f7fd463 100644 (file)
@@ -65,11 +65,14 @@ void HYDROGUI_ProfileInterpolateOp::startOperation()
 {
     HYDROGUI_Operation::startOperation();
 
-    HYDROGUI_ProfileInterpolateDlg* aPanel = ::qobject_cast<HYDROGUI_ProfileInterpolateDlg*>( inputPanel() );
-    if ( aPanel )
+    if ( isApplyAndClose() )
     {
+      HYDROGUI_ProfileInterpolateDlg* aPanel = ::qobject_cast<HYDROGUI_ProfileInterpolateDlg*>( inputPanel() );
+      if ( aPanel )
+      {
         aPanel->reset();
         aPanel->setInterpolators( interpolators() );
+      }
     }
 }