From: azv Date: Mon, 6 Apr 2015 11:58:19 +0000 (+0300) Subject: Fix the crash while removing lines with coincident points X-Git-Tag: V_1.1.0~57^2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8cadc422cc232613ce215e463276e29153d598e9;p=modules%2Fshaper.git Fix the crash while removing lines with coincident points --- 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]);