]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2722: Check returned context
authorvsv <vsv@opencascade.com>
Mon, 29 Oct 2018 09:59:56 +0000 (12:59 +0300)
committervsv <vsv@opencascade.com>
Mon, 29 Oct 2018 09:59:56 +0000 (12:59 +0300)
src/ModuleBase/ModuleBase_WidgetValidated.cpp

index 6fbd9b1749203f2bb5d23bf7a158f41070e96898..16b47680e337ab0a01b3dfd3951c90d9b3228d4a 100644 (file)
@@ -130,7 +130,8 @@ bool ModuleBase_WidgetValidated::isValidInFilters(const ModuleBase_ViewerPrsPtr&
             std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(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()) {