From 3347db4bea7becd89d05fad699fac6e19c6ad47a Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Wed, 9 May 2018 17:24:01 -0700 Subject: [PATCH] edje: do not reparent when the object is dead already. --- src/lib/edje/edje_util.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index fb66272427..71577832aa 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -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)); + } } }