cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=21164b5a56f2ff0fbe8e60f85f7070212cbdfe38

commit 21164b5a56f2ff0fbe8e60f85f7070212cbdfe38
Author: Cedric Bail <[email protected]>
Date:   Mon Mar 19 16:38:07 2018 -0700

    eo: automatically cancel a future that is attached to an invalidated object.
---
 src/lib/eo/eo_base_class.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 5fd47c4689..872ae3c16b 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -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));

-- 


Reply via email to