elementary/transit - fix a transit crash issue when user tries to kill all target...
authorChunEon Park <hermet@hermet.pe.kr>
Tue, 29 Jan 2013 07:37:57 +0000 (07:37 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Tue, 29 Jan 2013 07:37:57 +0000 (07:37 +0000)
SVN revision: 83413

legacy/elementary/ChangeLog
legacy/elementary/NEWS
legacy/elementary/src/lib/elm_transit.c

index 10c4d95..f6cdaee 100644 (file)
 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.
+
index 09266a5..35684eb 100644 (file)
@@ -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
index e0f26b8..5af1126 100644 (file)
@@ -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