ecore: no write after del for efl_loop_timeout.
authorCedric Bail <cedric@osg.samsung.com>
Thu, 11 Jan 2018 02:14:25 +0000 (18:14 -0800)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 17 Jan 2018 09:19:27 +0000 (18:19 +0900)
src/lib/ecore/efl_loop.c

index 333fe1d..3c1d746 100644 (file)
@@ -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 *