[scroller] fixed infinite loop bug in scroller
authorHosang Kim <hosang12.kim@samsung.com>
Fri, 10 Jan 2014 06:42:12 +0000 (15:42 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 10 Jan 2014 06:42:12 +0000 (15:42 +0900)
Summary: called scroller bring in API in "scroll,anim,stop" callback, so occured infinite loop

Reviewers: seoz, jaehwan, raster, woohyun, cedric

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D445

src/lib/elm_interface_scrollable.c

index 823374d..7f9026d 100644 (file)
@@ -1757,24 +1757,25 @@ _elm_scroll_content_region_show_internal(Evas_Object *obj,
    if ((sid->down.bounce_x_animator) || (sid->down.bounce_y_animator) ||
        (sid->scrollto.x.animator) || (sid->scrollto.y.animator))
      {
+        ELM_SAFE_FREE(sid->scrollto.x.animator, ecore_animator_del);
+        ELM_SAFE_FREE(sid->scrollto.y.animator, ecore_animator_del);
+        if (sid->down.bounce_x_animator)
+          {
+             ELM_SAFE_FREE(sid->down.bounce_x_animator, ecore_animator_del);
+             sid->bouncemex = EINA_FALSE;
+             if (sid->content_info.resized)
+               _elm_scroll_wanted_region_set(sid->obj);
+          }
+        if (sid->down.bounce_y_animator)
+          {
+             ELM_SAFE_FREE(sid->down.bounce_y_animator, ecore_animator_del);
+             sid->bouncemey = EINA_FALSE;
+             if (sid->content_info.resized)
+               _elm_scroll_wanted_region_set(sid->obj);
+          }
+
         _elm_scroll_anim_stop(sid);
      }
-   ELM_SAFE_FREE(sid->scrollto.x.animator, ecore_animator_del);
-   ELM_SAFE_FREE(sid->scrollto.y.animator, ecore_animator_del);
-   if (sid->down.bounce_x_animator)
-     {
-        ELM_SAFE_FREE(sid->down.bounce_x_animator, ecore_animator_del);
-        sid->bouncemex = EINA_FALSE;
-        if (sid->content_info.resized)
-          _elm_scroll_wanted_region_set(sid->obj);
-     }
-   if (sid->down.bounce_y_animator)
-     {
-        ELM_SAFE_FREE(sid->down.bounce_y_animator, ecore_animator_del);
-        sid->bouncemey = EINA_FALSE;
-        if (sid->content_info.resized)
-          _elm_scroll_wanted_region_set(sid->obj);
-     }
    if (sid->down.hold_animator)
      {
         ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del);