cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3347db4bea7becd89d05fad699fac6e19c6ad47a

commit 3347db4bea7becd89d05fad699fac6e19c6ad47a
Author: Cedric Bail <[email protected]>
Date:   Wed May 9 17:24:01 2018 -0700

    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));
+          }
      }
 }
 

-- 


Reply via email to