Salome HOME
#878 Segmentation fault when setting distance on the two same points
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintMulti.cpp
index 92a79eb04c890d02af02a02cd5771b435b306d36..e68a881be5b246c69e731d8dba9914e1746280d2 100644 (file)
@@ -136,6 +136,9 @@ void SketchSolver_ConstraintMulti::addFeature(FeaturePtr theFeature)
 
 void SketchSolver_ConstraintMulti::adjustConstraint()
 {
+  if (myAdjusted)
+    return; // constraint already adjusted, don't do it once again
+
   double aRelCoord[2]  = {0.0, 0.0}; // relative coordinates of point
   double anAbsCoord[2] = {0.0, 0.0}; // absolute coordinates of point
 
@@ -232,4 +235,5 @@ void SketchSolver_ConstraintMulti::adjustConstraint()
   }
 
   myPointsJustUpdated.clear();
+  myAdjusted = true;
 }