]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Task 2.3: Fix crash on sketch update when number of intersection points is decreased.
authorazv <azv@opencascade.com>
Fri, 25 May 2018 09:20:58 +0000 (12:20 +0300)
committerazv <azv@opencascade.com>
Fri, 25 May 2018 09:20:58 +0000 (12:20 +0300)
src/Model/Model_Update.cpp

index 44f7a47e94c7abb217565f1732083eee156a2d3a..c0a791e26322adb672972c235278ab6e399db981 100755 (executable)
@@ -578,7 +578,10 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
     if (aReason != theFeature && (aReason)->data()->isValid()) {
       if (processFeature(aReason))
         aIsModified = true;
-      if (aReason->data()->execState() == ModelAPI_StateInvalidArgument)
+      // check validity of aReason once again because it may be removed by dependent feature
+      // (e.g. by SketchPlugin_IntersectionPoint)
+      if (!aReason->data()->isValid() ||
+          aReason->data()->execState() == ModelAPI_StateInvalidArgument)
         isReferencedInvalid = true;
     }
     // searching for the next not used reason