From d5918a7cb099ceb4eef130323aede139d2c955df Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Wed, 10 Jan 2018 18:14:25 -0800 Subject: [PATCH] ecore: no write after del for efl_loop_timeout. --- src/lib/ecore/efl_loop.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 333fe1d..3c1d746 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -533,12 +533,9 @@ static void _efl_loop_timeout_cancel(void *data, const Eina_Promise *dead_ptr EINA_UNUSED) { Efl_Loop_Promise_Simple_Data *d = data; + if (d->timer) - { - efl_del(d->timer); - d->timer = NULL; - } - efl_loop_promise_simple_data_mp_free(d); + efl_del(d->timer); } static void @@ -548,7 +545,6 @@ _efl_loop_timeout_done(void *data, const Efl_Event *event) eina_promise_resolve(d->promise, EINA_VALUE_EMPTY); d->timer = NULL; - efl_loop_promise_simple_data_mp_free(d); efl_del(event->object); } @@ -556,7 +552,9 @@ static void _efl_loop_timeout_del(void *data, const Efl_Event *event EINA_UNUSED) { Efl_Loop_Promise_Simple_Data *d = data; + d->timer = NULL; + efl_loop_promise_simple_data_mp_free(d); } static Eina_Future * -- 2.7.4