From 95ff1008bc8215fdeafd7d253dc5a6f33e949363 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 19 May 2022 13:38:41 +0300 Subject: [PATCH] [bos #29947] [CEA 29944] SIGSEGV using filet --- src/ModuleBase/ModuleBase_WidgetSelector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index a4181dc5b..ae2878c86 100644 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -73,7 +73,9 @@ void ModuleBase_WidgetSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr& theShape = aSelection->getShape(thePrs); FeaturePtr aFeature = ModelAPI_Feature::feature(theObject); - while (aFeature && aFeature->lastResult()->groupName() == ModelAPI_ResultGroup::group()) { + while (aFeature.get() && + aFeature->lastResult().get() && + aFeature->lastResult()->groupName() == ModelAPI_ResultGroup::group()) { if (!getObjectFromGroup(theObject, theShape)) break; aFeature = ModelAPI_Feature::feature(theObject); @@ -297,4 +299,4 @@ bool getObjectFromGroup(ObjectPtr& theObject, GeomShapePtr& theShape) } } return false; -} \ No newline at end of file +} -- 2.39.2