summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-31 18:12:48 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-17 15:21:09 +0200
commitadc51e882c5e57d5b38c58541d6e9f57a181c4be (patch)
tree360d0c9440dea421d52827cf233aa93916df18c1
parentd5445918ec9fd5f6399ed7c4649df9ac72c2be85 (diff)
downloadefl-adc51e882c5e57d5b38c58541d6e9f57a181c4be.tar.gz
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 <xavierartigas@yahoo.es> Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8520
-rw-r--r--src/lib/elementary/efl_ui_widget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index 99da93aa3b..6ab2d8a026 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -1486,6 +1486,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