cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=950e2c13bbfd2367c20b70e6249a23084db88c45

commit 950e2c13bbfd2367c20b70e6249a23084db88c45
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Mar 13 12:08:25 2018 -0400

    efl_promise: avoid invalid calls when unsetting parent
    
    if promise has no parent then the promise's loop is null
    
    Signed-off-by: Mike Blumenkrantz <zm...@osg.samsung.com>
---
 src/lib/ecore/efl_promise.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/ecore/efl_promise.c b/src/lib/ecore/efl_promise.c
index 3e522b4564..dbec2f8f4d 100644
--- a/src/lib/ecore/efl_promise.c
+++ b/src/lib/ecore/efl_promise.c
@@ -708,6 +708,9 @@ _efl_promise_efl_object_parent_set(Eo *obj, 
Efl_Promise_Data *pd, Efl_Object *pa
 {
    if (!parent) _efl_promise_loop_clear(obj, pd);
    efl_parent_set(efl_super(obj, EFL_PROMISE_CLASS), parent);
+   pd->loop = NULL;
+   pd->loop_data = NULL;
+   if (!parent) return;
    pd->loop = efl_provider_find(obj, EFL_LOOP_CLASS);
    pd->loop_data = efl_data_scope_get(pd->loop, EFL_LOOP_CLASS);
 }

-- 


Reply via email to