From: azv Date: Fri, 25 May 2018 09:20:58 +0000 (+0300) Subject: Task 2.3: Fix crash on sketch update when number of intersection points is decreased. X-Git-Tag: EDF_2018-1~33^2~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4833c0f5837d5609ae2eafa5a33c31492db3b400;p=modules%2Fshaper.git Task 2.3: Fix crash on sketch update when number of intersection points is decreased. --- 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