summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-02 19:34:06 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2015-09-02 17:25:22 +0530
commit9fde98ead28d6493e77a6b9b858e37d63c328a69 (patch)
tree3786769c251dbfa5e713d981c34e553299a4d72f
parent7e00a3da1092a4798cfabe2ef0b4f19346d8cd4c (diff)
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
-rw-r--r--src/lib/elm_map.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 8a3101894..10172703d 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -1122,12 +1122,17 @@ _zoom_do(Elm_Map_Data *sd,
1122 (x, y, vw, vh)); 1122 (x, y, vw, vh));
1123 } 1123 }
1124 1124
1125 if (sd->zoom_timer) ecore_timer_del(sd->zoom_timer); 1125 if (sd->zoom_timer)
1126 {
1127 ecore_timer_del(sd->zoom_timer);
1128 sd->zoom_timer = NULL;
1129 }
1126 else 1130 else
1127 eo_do(sd->obj, eo_event_callback_call 1131 eo_do(sd->obj, eo_event_callback_call
1128 (EVAS_ZOOMABLE_INTERFACE_EVENT_ZOOM_START, NULL)); 1132 (EVAS_ZOOMABLE_INTERFACE_EVENT_ZOOM_START, NULL));
1129 1133
1130 sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj); 1134 if (sd->obj)
1135 sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj);
1131 eo_do(sd->obj, eo_event_callback_call 1136 eo_do(sd->obj, eo_event_callback_call
1132 (ELM_MAP_EVENT_ZOOM_CHANGE, NULL)); 1137 (ELM_MAP_EVENT_ZOOM_CHANGE, NULL));
1133 1138