From 8cadc422cc232613ce215e463276e29153d598e9 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 6 Apr 2015 14:58:19 +0300 Subject: [PATCH] Fix the crash while removing lines with coincident points --- src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp b/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp index 52dc868ba..1172988cb 100644 --- a/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp @@ -121,8 +121,12 @@ bool SketchSolver_ConstraintCoincidence::remove(ConstraintPtr theConstraint) break; if (aPos >= (int)myExtraCoincidence.size()) return false; // there is no constraint, which is specified to remove - else + else { + bool isEmpty = anExtraIt->first == SLVS_E_UNKNOWN; myExtraCoincidence.erase(anExtraIt); + if (isEmpty) + return false; + } } bool isFullyRemoved = myStorage->removeConstraint(mySlvsConstraints[aPos+1]); -- 2.39.2