From d1e603f688465294b637af668c1b70198d1f2c84 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 30 Oct 2019 09:29:56 -0400 Subject: [PATCH] elm/widget: error on null params for tree_unfocusable functions Summary: these should error so the user can detect that they screwed up Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10563 --- src/lib/elementary/efl_ui_widget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index d98ee78fa1..61c8c62119 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -1732,7 +1732,7 @@ elm_widget_tree_unfocusable_set(Eo *obj, Eina_Bool tree_unfocusable) Efl_Ui_Widget *subs; Eina_List *n; Elm_Widget_Smart_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS); - if (!pd) return; + EINA_SAFETY_ON_NULL_RETURN(pd); int distance, parent_counter = (pd->parent_obj ? _tree_unfocusable_counter_get(pd->parent_obj) : 0); if (tree_unfocusable) @@ -1772,7 +1772,7 @@ EAPI Eina_Bool elm_widget_tree_unfocusable_get(const Eo *obj) { Elm_Widget_Smart_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); - if (!sd) return EINA_FALSE; + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE); return !!sd->tree_unfocusable; }