ami pushed a commit to branch elementary-1.15.

http://git.enlightenment.org/core/elementary.git/commit/?id=9fde98ead28d6493e77a6b9b858e37d63c328a69

commit 9fde98ead28d6493e77a6b9b858e37d63c328a69
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Sep 2 19:34:06 2015 +0900

    elm map - fix crash on badly handled zoom timeout callback
    
    if sd->obj is null then the a zoom timeout has a null data param and
    that means we cant get sd data... so dont set up a zoom timeout unless
    sd->obj is valid.
    
    @fix
---
 src/lib/elm_map.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 8a31018..1017270 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -1122,12 +1122,17 @@ _zoom_do(Elm_Map_Data *sd,
               (x, y, vw, vh));
      }
 
-   if (sd->zoom_timer) ecore_timer_del(sd->zoom_timer);
+   if (sd->zoom_timer)
+     {
+        ecore_timer_del(sd->zoom_timer);
+        sd->zoom_timer = NULL;
+     }
    else
       eo_do(sd->obj, eo_event_callback_call
         (EVAS_ZOOMABLE_INTERFACE_EVENT_ZOOM_START, NULL));
 
-   sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj);
+   if (sd->obj)
+     sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj);
    eo_do(sd->obj, eo_event_callback_call
      (ELM_MAP_EVENT_ZOOM_CHANGE, NULL));
 

-- 


Reply via email to