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
This commit is contained in:
ChunEon Park 2011-03-10 12:04:00 +00:00
parent 17977b5483
commit f5c5b5d054
1 changed files with 2 additions and 1 deletions

View File

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