devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=37e258904d065b50620f8ac42963c1365a1d0558

commit 37e258904d065b50620f8ac42963c1365a1d0558
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Oct 30 09:29:56 2019 -0400

    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;
 }

-- 


Reply via email to