edje: do not reparent when the object is dead already.

This commit is contained in:
Cedric Bail 2018-05-09 17:24:01 -07:00 committed by Cedric BAIL
parent a3c91d14a9
commit 3347db4bea
1 changed files with 11 additions and 1 deletions

View File

@ -4540,9 +4540,19 @@ _edje_child_add(Edje *ed, Edje_Real_Part *rp, Evas_Object *child)
static void
_eo_unparent_helper(Eo *child, Eo *parent)
{
if (efl_invalidated_get(child)) return ;
if (efl_parent_get(child) == parent)
{
efl_parent_set(child, evas_object_evas_get(parent));
if (efl_invalidated_get(evas_object_evas_get(parent)))
// Temporary reparenting children to the main loop.
// They are about to die, but shouldn't just yet.
{
efl_parent_set(child, efl_main_loop_get());
}
else
{
efl_parent_set(child, evas_object_evas_get(parent));
}
}
}