From: vsv Date: Mon, 29 Oct 2018 09:59:56 +0000 (+0300) Subject: Issue #2722: Check returned context X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d4e083d33d7caa14cfbc99f6599caab150908da8;p=modules%2Fshaper.git Issue #2722: Check returned context --- diff --git a/src/ModuleBase/ModuleBase_WidgetValidated.cpp b/src/ModuleBase/ModuleBase_WidgetValidated.cpp index 6fbd9b174..16b47680e 100644 --- a/src/ModuleBase/ModuleBase_WidgetValidated.cpp +++ b/src/ModuleBase/ModuleBase_WidgetValidated.cpp @@ -130,7 +130,8 @@ bool ModuleBase_WidgetValidated::isValidInFilters(const ModuleBase_ViewerPrsPtr& std::dynamic_pointer_cast(anAttr); aSelectAttr->setValue(myPresentedObject, GeomShapePtr(), true); GeomShapePtr aShape = aSelectAttr->value(); - if (!aShape.get() && aSelectAttr->contextFeature()->firstResult().get()) { + if (!aShape.get() && aSelectAttr->contextFeature().get() && + aSelectAttr->contextFeature()->firstResult().get()) { aShape = aSelectAttr->contextFeature()->firstResult()->shape(); } if (aShape.get()) {