From: hermet Date: Thu, 9 Jun 2011 10:08:58 +0000 (+0000) Subject: elementary/list - fixed for potential duplicated deletion (this is patched by jae... X-Git-Tag: REL_F_I9500_20120323_1~17^2~2605 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4a5f4a5632b35f787cb7899a2ab669ada215018;p=framework%2Fuifw%2Felementary.git elementary/list - fixed for potential duplicated deletion (this is patched by jae.hwan.kim@samsung.com) since the list calls the unref, it could be deleted multiple times when user delete the list in it's callback function. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@60124 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 6989969..179eb49 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -448,6 +448,20 @@ _elm_list_unwalk(Widget_Data *wd) } static void +_del_pre_hook(Evas_Object *obj) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + + evas_object_event_callback_del(wd->scr, + EVAS_CALLBACK_CHANGED_SIZE_HINTS, + _changed_size_hints); + evas_object_event_callback_del(wd->box, + EVAS_CALLBACK_CHANGED_SIZE_HINTS, + _changed_size_hints); +} + +static void _del_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); @@ -1313,6 +1327,7 @@ elm_list_add(Evas_Object *parent) elm_widget_sub_object_add(parent, obj); elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL); elm_widget_data_set(obj, wd); + elm_widget_del_pre_hook_set(obj, _del_pre_hook); elm_widget_del_hook_set(obj, _del_hook); elm_widget_theme_hook_set(obj, _theme_hook); elm_widget_disable_hook_set(obj, _disable_hook);