]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Protect constraint without flyout point of setting such attribute by SketchSolver_Manager
authorazv <azv@opencascade.com>
Mon, 9 Oct 2017 13:29:39 +0000 (16:29 +0300)
committerazv <azv@opencascade.com>
Mon, 9 Oct 2017 13:29:39 +0000 (16:29 +0300)
src/SketchSolver/SketchSolver_Manager.cpp

index 03a9e38c13a62f97dfd9356742950499c4cbf0f3..8f30aa70d255071eba9bcd450e63cf7cc9886df0 100644 (file)
@@ -248,8 +248,11 @@ bool SketchSolver_Manager::moveFeature(
   {
     std::shared_ptr<GeomDataAPI_Point2D> aPntAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>
       (aConstraint->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
-    aPntAttr->setValue(theTo);
-    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+    if (aPntAttr)
+    {
+      aPntAttr->setValue(theTo);
+      Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+    }
     return true;
   }