From: Artem Zhidkov Date: Tue, 30 Jun 2020 11:05:23 +0000 (+0300) Subject: Task #3231: Sketcher Offset of a curve. X-Git-Tag: V9_6_0a1~60^2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b4ed7bbd704034956e866a235347384b564ce878;p=modules%2Fshaper.git Task #3231: Sketcher Offset of a curve. Fix crash on Linear and Angular Copies. --- diff --git a/src/SketchPlugin/SketchPlugin_Validators.cpp b/src/SketchPlugin/SketchPlugin_Validators.cpp index 42220392d..beaef63a7 100644 --- a/src/SketchPlugin/SketchPlugin_Validators.cpp +++ b/src/SketchPlugin/SketchPlugin_Validators.cpp @@ -552,10 +552,12 @@ bool SketchPlugin_CopyValidator::isValid(const AttributePtr& theAttribute, if (!isFound) { // check in the results of the feature FeaturePtr aFeature = std::dynamic_pointer_cast(*anObjIter); - const std::list& aResults = aFeature->results(); - for (std::list::const_iterator aResIt = aResults.begin(); - aResIt != aResults.end() && !isFound; ++aResIt) { - isFound = aSelObject == *aResIt; + if (aFeature) { + const std::list& aResults = aFeature->results(); + for (std::list::const_iterator aResIt = aResults.begin(); + aResIt != aResults.end() && !isFound; ++aResIt) { + isFound = aSelObject == *aResIt; + } } } if (isFound) {