From: ChunEon Park 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: v1.0.0~2862 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf7e599fb9042e0c4490cdef7261c3f55ecf5b5a;p=platform%2Fupstream%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. SVN revision: 60124 --- 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);