]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Crash in solver in the following case:
authornds <nds@opencascade.com>
Sat, 26 Dec 2015 18:16:36 +0000 (21:16 +0300)
committernds <nds@opencascade.com>
Sat, 26 Dec 2015 18:17:00 +0000 (21:17 +0300)
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

index 012a45423c05873fa2e3a10425f3a4cf0b80a82a..ee1700d22a40a42b59910e532ffd0f2ea264dc6b 100644 (file)
@@ -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);