forked from enlightenment/efl
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 <zmike@osg.samsung.com>
This commit is contained in:
parent
a1655cf9cb
commit
950e2c13bb
|
@ -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);
|
if (!parent) _efl_promise_loop_clear(obj, pd);
|
||||||
efl_parent_set(efl_super(obj, EFL_PROMISE_CLASS), parent);
|
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 = efl_provider_find(obj, EFL_LOOP_CLASS);
|
||||||
pd->loop_data = efl_data_scope_get(pd->loop, EFL_LOOP_CLASS);
|
pd->loop_data = efl_data_scope_get(pd->loop, EFL_LOOP_CLASS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue