From fc88c49ff45f48d63ff6067384e56eb146c4cbc0 Mon Sep 17 00:00:00 2001 From: nds Date: Sat, 26 Dec 2015 21:16:36 +0300 Subject: [PATCH] Crash in solver in the following case: 1. Start sketch 2. Create a line 3. Start Fixed constraint 4. Select a point on the line. Apply 5. Select the line by rectangle 6. Delete button click BUG: crash --- src/SketchSolver/SketchSolver_ConstraintFixed.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SketchSolver/SketchSolver_ConstraintFixed.cpp b/src/SketchSolver/SketchSolver_ConstraintFixed.cpp index 012a45423..ee1700d22 100644 --- a/src/SketchSolver/SketchSolver_ConstraintFixed.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintFixed.cpp @@ -100,8 +100,10 @@ bool SketchSolver_ConstraintFixed::remove() if (myBaseConstraint && myFixedAttribute) { if (myFixedAttribute->isObject()) aFeature = ModelAPI_Feature::feature(myFixedAttribute->object()); - else - myStorage->update(AttributePtr(myFixedAttribute), myGroupID); + else { + if (myFixedAttribute->attr().get()) + myStorage->update(AttributePtr(myFixedAttribute), myGroupID); + } } if (aFeature) myStorage->update(aFeature, myGroupID); -- 2.39.2