eo: automatically cancel a future that is attached to an invalidated object.
authorCedric Bail <cedric@osg.samsung.com>
Mon, 19 Mar 2018 23:38:07 +0000 (16:38 -0700)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 10 Apr 2018 11:22:00 +0000 (20:22 +0900)
src/lib/eo/eo_base_class.c

index 5fd47c4..872ae3c 100644 (file)
@@ -1983,6 +1983,7 @@ efl_future_cb_from_desc(Eo *o, const Efl_Future_Cb_Desc desc)
    EINA_SAFETY_ON_NULL_GOTO(o, end);
    pd = efl_data_scope_get(o, EFL_OBJECT_CLASS);
    EINA_SAFETY_ON_NULL_GOTO(pd, end);
+   if (pd->invalidate) goto end;
    pending = _efl_pending_future_new();
    EINA_SAFETY_ON_NULL_GOTO(pending, end);
    memcpy(&pending->desc, &desc, sizeof(Efl_Future_Cb_Desc));