jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/apps/rage.git/commit/?id=409361142de503d6aaa24ea4473281776244bc65

commit 409361142de503d6aaa24ea4473281776244bc65
Author: Daniel Zaoui <daniel.za...@yahoo.com>
Date:   Sat Aug 8 00:13:55 2015 +0300

    Delete Evas callbacks on win deletion
    
    A crash happens when a movie finishes and the program terminates.
    An access to the "inf" data is done, although this data has been freed
    during the win deletion.
    It crashes only if the mouse is not over the progress bar.
    
    @fix
---
 src/bin/win.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/bin/win.c b/src/bin/win.c
index 6a1e6d7..4e768e2 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -29,6 +29,8 @@ _cb_unfullscreen(void *data EINA_UNUSED, Evas_Object *obj, 
void *event EINA_UNUS
 }
 
 static void
+_cb_mouse_move(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+static void
 _cb_win_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, 
void *ev EINA_UNUSED)
 {
    Inf *inf = evas_object_data_get(obj, "inf");
@@ -46,6 +48,17 @@ _cb_win_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, 
Evas_Object *obj, void
         if (vid->uri) efreet_uri_free(vid->uri);
         free(vid);
      }
+   evas_object_event_callback_del_full(inf->event, EVAS_CALLBACK_MOUSE_MOVE,
+                                  _cb_mouse_move, obj);
+   evas_object_event_callback_del_full(inf->event, EVAS_CALLBACK_MOUSE_IN,
+                                  _cb_mouse_move, obj);
+   evas_object_event_callback_del_full(inf->event, EVAS_CALLBACK_MOUSE_DOWN,
+                                  _cb_mouse_move, obj);
+   evas_object_event_callback_del_full(inf->event2, EVAS_CALLBACK_MOUSE_MOVE,
+                                  _cb_mouse_move, obj);
+   evas_object_event_callback_del_full(inf->event2, EVAS_CALLBACK_MOUSE_OUT,
+                                  _cb_mouse_move, obj);
+
    evas_object_data_del(obj, "inf");
    free(inf);
    dnd_shutdown();

-- 


Reply via email to