ecore: no write after del for efl_loop_timeout.

This commit is contained in:
Cedric Bail 2018-01-10 18:14:25 -08:00
parent c5cd3f1a79
commit 0b6f74fde6
1 changed files with 4 additions and 6 deletions

View File

@ -533,12 +533,9 @@ static void
_efl_loop_timeout_cancel(void *data, const Eina_Promise *dead_ptr EINA_UNUSED) _efl_loop_timeout_cancel(void *data, const Eina_Promise *dead_ptr EINA_UNUSED)
{ {
Efl_Loop_Promise_Simple_Data *d = data; Efl_Loop_Promise_Simple_Data *d = data;
if (d->timer) if (d->timer)
{ efl_del(d->timer);
efl_del(d->timer);
d->timer = NULL;
}
efl_loop_promise_simple_data_mp_free(d);
} }
static void static void
@ -548,7 +545,6 @@ _efl_loop_timeout_done(void *data, const Efl_Event *event)
eina_promise_resolve(d->promise, EINA_VALUE_EMPTY); eina_promise_resolve(d->promise, EINA_VALUE_EMPTY);
d->timer = NULL; d->timer = NULL;
efl_loop_promise_simple_data_mp_free(d);
efl_del(event->object); efl_del(event->object);
} }
@ -556,7 +552,9 @@ static void
_efl_loop_timeout_del(void *data, const Efl_Event *event EINA_UNUSED) _efl_loop_timeout_del(void *data, const Efl_Event *event EINA_UNUSED)
{ {
Efl_Loop_Promise_Simple_Data *d = data; Efl_Loop_Promise_Simple_Data *d = data;
d->timer = NULL; d->timer = NULL;
efl_loop_promise_simple_data_mp_free(d);
} }
static Eina_Future * static Eina_Future *