From: ChunEon Park Date: Tue, 29 Jan 2013 07:37:57 +0000 (+0000) Subject: elementary/transit - fix a transit crash issue when user tries to kill all target... X-Git-Tag: upstream/1.20.0~7116^2~14^2~5185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c669fcc04d7bfe35766a3b98520ffde644630e7;p=platform%2Fupstream%2Fefl.git elementary/transit - fix a transit crash issue when user tries to kill all target objects in the effect end callback SVN revision: 83413 --- diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 10c4d95..f6cdaee 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -968,3 +968,8 @@ 2013-01-29 Jaehwan Kim * Fix the scroll position is calculated by the size of pan object, not the size of scroller. + +2013-01-29 ChunEon Park (Hermet) + + * Fix a elm_transit crash issue when user delete all target objects in the effect end callback. + diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index 09266a5..35684eb 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -134,7 +134,7 @@ Fixes: * when parent of ctxpopup is resized, ctxpopup calls dismissed signal. * Fix memory leak of the ctxpopup and callback function to be ctxpopup obj is delivered to. * Apply disply mode to all views of a naviframe if the display mode of the views are changed. Sometimes views are couldn't be recoverved to a previous status if they are stacked into more depth. - + * Fix a elm_transit crash issue when user delete all target objects in the effect end callback. Removals: * All internal widget hooks (and related macros) were removed, due diff --git a/legacy/elementary/src/lib/elm_transit.c b/legacy/elementary/src/lib/elm_transit.c index e0f26b8..5af1126 100644 --- a/legacy/elementary/src/lib/elm_transit.c +++ b/legacy/elementary/src/lib/elm_transit.c @@ -172,7 +172,7 @@ _transit_obj_remove_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *e free(obj_data); } _remove_obj_from_list(transit, obj); - if (!transit->objs) elm_transit_del(transit); + if (!transit->objs && !transit->deleted) elm_transit_del(transit); } static void @@ -250,6 +250,8 @@ _transit_del(Elm_Transit *transit) Elm_Transit *chain_transit; Eina_List *elist, *elist_next; + transit->deleted = EINA_TRUE; + if (transit->animator) ecore_animator_del(transit->animator); @@ -265,8 +267,6 @@ _transit_del(Elm_Transit *transit) while (transit->objs) _transit_obj_remove(transit, eina_list_data_get(transit->objs)); - transit->deleted = EINA_TRUE; - if (transit->del_data.func) transit->del_data.func(transit->del_data.arg, transit); @@ -481,8 +481,9 @@ elm_transit_del(Elm_Transit *transit) { ELM_TRANSIT_CHECK_OR_RETURN(transit); - if (transit->walking) transit->deleted = EINA_TRUE; - else _transit_del(transit); + transit->deleted = EINA_TRUE; + if (transit->walking) return; + _transit_del(transit); } EAPI void