From f5c5b5d054fa8f5dd7a08c64d96593c591e53089 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Thu, 10 Mar 2011 12:04:00 +0000 Subject: [PATCH] elementary/widget - add one exception handling where it should be. After a widget is created(obj = elm_widget_add), the object does not have any parent object. However if user call elm_widget_sub_object_add(parent, obj), then CRI will be happened. So the exception should be there. SVN revision: 57667 --- legacy/elementary/src/lib/elm_widget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c index f22c578486..6c448fd246 100644 --- a/legacy/elementary/src/lib/elm_widget.c +++ b/legacy/elementary/src/lib/elm_widget.c @@ -715,7 +715,8 @@ elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj) { if (sd2->parent_obj == obj) return; - elm_widget_sub_object_del(sd2->parent_obj, sobj); + if (sd2->parent_obj) + elm_widget_sub_object_del(sd2->parent_obj, sobj); sd2->parent_obj = obj; if (!sd->child_can_focus && (_is_focusable(sobj))) sd->child_can_focus = EINA_TRUE;