From d4e083d33d7caa14cfbc99f6599caab150908da8 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 29 Oct 2018 12:59:56 +0300 Subject: [PATCH] Issue #2722: Check returned context --- src/ModuleBase/ModuleBase_WidgetValidated.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) { -- 2.39.2