summaryrefslogtreecommitdiff
path: root/src/lib/ecore/ecore_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore/ecore_timer.c')
-rw-r--r--src/lib/ecore/ecore_timer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 54cf773149..1b69676e54 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -157,8 +157,14 @@ _ecore_timer_legacy_tick(void *data, const Eo_Event *event)
157 157
158 if (!_ecore_call_task_cb(legacy->func, (void*)legacy->data)) 158 if (!_ecore_call_task_cb(legacy->func, (void*)legacy->data))
159 { 159 {
160 eo_del(event->obj); 160 if (eo_key_data_get(event->obj, "_legacy"))
161 free(legacy); 161 {
162 eo_key_del(event->obj, "_legacy");
163 eo_event_callback_del(event->obj, EFL_TIMER_EVENT_TICK,
164 _ecore_timer_legacy_tick, legacy),
165 free(legacy);
166 eo_del(event->obj);
167 }
162 } 168 }
163 169
164 return EO_CALLBACK_CONTINUE; 170 return EO_CALLBACK_CONTINUE;
@@ -219,8 +225,10 @@ ecore_timer_del(Ecore_Timer *timer)
219 legacy = eo_key_data_get(timer, "_legacy"); 225 legacy = eo_key_data_get(timer, "_legacy");
220 data = (void*) legacy->data; 226 data = (void*) legacy->data;
221 227
222 free(legacy);
223 eo_key_del(timer, "_legacy"); 228 eo_key_del(timer, "_legacy");
229 eo_event_callback_del(timer, EFL_TIMER_EVENT_TICK,
230 _ecore_timer_legacy_tick, legacy),
231 free(legacy);
224 eo_del(timer); 232 eo_del(timer);
225 233
226 return data; 234 return data;