From 4833c0f5837d5609ae2eafa5a33c31492db3b400 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 25 May 2018 12:20:58 +0300 Subject: [PATCH] Task 2.3: Fix crash on sketch update when number of intersection points is decreased. --- src/Model/Model_Update.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 44f7a47e9..c0a791e26 100755 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -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 -- 2.30.2