Salome HOME
Fix the crash while removing lines with coincident points
authorazv <azv@opencascade.com>
Mon, 6 Apr 2015 11:58:19 +0000 (14:58 +0300)
committerazv <azv@opencascade.com>
Mon, 6 Apr 2015 11:58:19 +0000 (14:58 +0300)
src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp

index 52dc868babdf4facc6a676da3c473e1e66871d0b..1172988cba921d4ba5e83eab6c9d0627ca88789f 100644 (file)
@@ -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]);