From d7ae71d58340de92e2e069fa0b2f0968f4a12ce5 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 22 Dec 2015 09:32:12 +0300 Subject: [PATCH] Crash on abort constraints (issues #1153, #1154, #1159) --- .../SolveSpaceSolver/SolveSpaceSolver_Storage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp index cf11cf838..999f43eef 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp @@ -1544,6 +1544,10 @@ bool SolveSpaceSolver_Storage::removeCoincidence(ConstraintWrapperPtr theConstra // remove not coincident points for (aNotCIt = aNotCoinc.begin(); aNotCIt != aNotCoinc.end(); ++aNotCIt) { + if (aPtPtIt->second.size() <= 1) { + myCoincidentPoints.erase(aPtPtIt); + break; + } if (aPtPtIt->first == aNotCIt->first) { std::set aSlaves = aPtPtIt->second; EntityWrapperPtr aNewMaster = *aSlaves.begin(); -- 2.39.2