From: vsv Date: Mon, 29 Oct 2018 09:59:56 +0000 (+0300) Subject: Issue #2722: Check returned context X-Git-Tag: End2018~246 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=20d7ea3352f0f6d1b7370240f7fd2db3f8338272;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()) {