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()) {