summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-25 22:09:32 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-25 22:09:58 +0900
commit3e17edaef7e4ebdea100de1b26a1d41e930ec7b8 (patch)
tree9a34d83347cdc4d0fb11618e46ce6496cade03b8
parent35d9f1f936c7e2a3346820776944c98a3bd0995e (diff)
widget: Add error message when the parent parameter was set wrongly.
This helps application developers debug their apps easier.
-rw-r--r--src/lib/elm_widget.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 974210c21..80213dcb8 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -1038,6 +1038,13 @@ elm_widget_sub_object_parent_add(Evas_Object *sobj)
1038 Eo *parent = NULL; 1038 Eo *parent = NULL;
1039 1039
1040 eo_do(sobj, parent = eo_parent_get()); 1040 eo_do(sobj, parent = eo_parent_get());
1041 if (!eo_isa(parent, ELM_WIDGET_CLASS))
1042 {
1043 ERR("You passed a wrong parent parameter (%p %s). "
1044 "Elementary widget's parent should be an elementary widget.", parent, evas_object_type_get(parent));
1045 return ret;
1046 }
1047
1041 eo_do(parent, ret = elm_obj_widget_sub_object_add(sobj)); 1048 eo_do(parent, ret = elm_obj_widget_sub_object_add(sobj));
1042 1049
1043 return ret; 1050 return ret;