From bbf1b95db6067cb671692721f3523ab7ae543e69 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 31 Mar 2019 18:12:48 +0200 Subject: [PATCH] efl_ui_widget: we should ensure that every subobject is a gfx entity we are calling visible_set on them later on, this will drop errors, additionally this safes us from checking this in the widget-container code. Reviewed-by: Xavi Artigas Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D8520 --- src/lib/elementary/efl_ui_widget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 8d4034c..f0e2905 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -1620,6 +1620,7 @@ _efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob Efl_Ui_Widget *parent; if (!sobj) return EINA_FALSE; + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(sobj, EFL_GFX_ENTITY_INTERFACE), EINA_FALSE); EINA_SAFETY_ON_TRUE_RETURN_VAL(obj == sobj, EINA_FALSE); //first make sure that we unregister the sobj from the parent -- 2.7.4