]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Crash when searching duplicated constraints
authorazv <azv@opencascade.com>
Thu, 24 Dec 2015 10:49:58 +0000 (13:49 +0300)
committerazv <azv@opencascade.com>
Thu, 24 Dec 2015 10:50:41 +0000 (13:50 +0300)
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp

index 892396a35644588ef75503524e54978b550332dd..3006fd5b8f7e16468fb3e6795abcc65e5f83439b 100644 (file)
@@ -406,8 +406,9 @@ void SolveSpaceSolver_Storage::replaceInConstraints(
             aConstr.ptA == aSlvsCIt->ptA && aConstr.ptB == aSlvsCIt->ptB &&
             aConstr.entityA == aSlvsCIt->entityA && aConstr.entityB == aSlvsCIt->entityB &&
             aConstr.entityC == aSlvsCIt->entityC && aConstr.entityD == aSlvsCIt->entityD) {
-          removeConstraint(aConstr.h);
+          Slvs_hConstraint anIDToRemove = aConstr.h;
           aConstr = *aSlvsCIt;
+          removeConstraint(anIDToRemove);
           break;
         }