cedric pushed a commit to branch master.

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

commit ef0df96da197e2018ce1ecd84c67b246c34a1f90
Author: Cedric BAIL <[email protected]>
Date:   Mon Jun 6 16:19:55 2016 -0700

    ecore: properly reset fd handler when parent get deleted.
---
 src/lib/ecore/efl_loop_fd.c  | 13 +++++++++++++
 src/lib/ecore/efl_loop_fd.eo |  1 +
 2 files changed, 14 insertions(+)

diff --git a/src/lib/ecore/efl_loop_fd.c b/src/lib/ecore/efl_loop_fd.c
index 50bd4c2..80e7a18 100644
--- a/src/lib/ecore/efl_loop_fd.c
+++ b/src/lib/ecore/efl_loop_fd.c
@@ -167,6 +167,19 @@ _efl_loop_fd_eo_base_constructor(Eo *obj, Efl_Loop_Fd_Data 
*pd)
 }
 
 static void
+_efl_loop_fd_eo_base_parent_set(Eo *obj, Efl_Loop_Fd_Data *pd, Eo_Base *parent)
+{
+   if (pd->handler) ecore_main_fd_handler_del(pd->handler);
+   pd->handler = NULL;
+
+   eo_parent_set(eo_super(obj, MY_CLASS), parent);
+
+   if (parent == NULL) return ;
+
+   _efl_loop_fd_reset(obj, pd);
+}
+
+static void
 _efl_loop_fd_eo_base_destructor(Eo *obj, Efl_Loop_Fd_Data *pd)
 {
    eo_destructor(eo_super(obj, MY_CLASS));
diff --git a/src/lib/ecore/efl_loop_fd.eo b/src/lib/ecore/efl_loop_fd.eo
index ec1003d..9284846 100644
--- a/src/lib/ecore/efl_loop_fd.eo
+++ b/src/lib/ecore/efl_loop_fd.eo
@@ -41,5 +41,6 @@ class Efl.Loop.Fd (Efl.Loop_User)
    implements {
       Eo.Base.constructor;
       Eo.Base.destructor;
+      Eo.Base.parent.set;
    }
 }

-- 


Reply via email to