discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3e9029ea08c14135f68693a872c1d23fecdec3d8

commit 3e9029ea08c14135f68693a872c1d23fecdec3d8
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Tue Feb 16 16:41:03 2016 -0500

    Ensure wayland clients haven't been deleted when processing callbacks
    
    Summary:
    It's apparently possible to trigger at least some of these by interacting
    with a client as it's closing, so add a bunch of checks.
    
    Reviewers: zmike
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D3699
---
 src/bin/e_comp_wl.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 075cfa4..8c450a8 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -107,7 +107,7 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, 
Evas_Object *obj EIN
    Eina_List *l;
 
    if (!(ec = data)) return;
-   if (e_object_is_del(data)) return;
+   if (e_object_is_del(E_OBJECT(ec))) return;
 
    if (!ec->override) e_hints_window_visible_set(ec);
 
@@ -181,6 +181,7 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *ob
    uint32_t serial;
 
    if (!(ec = data)) return;
+   if (e_object_is_del(E_OBJECT(ec))) return;
    if (ec->cur_mouse_action) return;
    /* FIXME? this is a hack to just reset the cursor whenever we mouse out. 
not sure if accurate */
    {
@@ -314,6 +315,7 @@ _e_comp_wl_evas_cb_multi_down(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *o
    Evas_Event_Multi_Down *ev = event;
    wl_fixed_t x, y;
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
    if (!ec->comp_data->surface) return;
 
    wc = wl_resource_get_client(ec->comp_data->surface);
@@ -341,6 +343,7 @@ _e_comp_wl_evas_cb_multi_up(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *obj
    E_Client *ec = data;
    Evas_Event_Multi_Up *ev = event;
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
    if (!ec->comp_data->surface) return;
 
    wc = wl_resource_get_client(ec->comp_data->surface);
@@ -364,6 +367,7 @@ _e_comp_wl_evas_cb_multi_move(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *o
    Evas_Event_Multi_Move *ev = event;
    wl_fixed_t x, y;
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
    if (!ec->comp_data->surface) return;
 
    wc = wl_resource_get_client(ec->comp_data->surface);
@@ -503,8 +507,7 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *ob
    double t;
 
    if (!(ec = data)) return;
-
-   if (!ec->comp_data) return;
+   if (e_object_is_del(E_OBJECT(ec))) return;
 
    E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del);
 
@@ -536,6 +539,7 @@ _e_comp_wl_evas_cb_restack(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EIN
    E_Client *sec, *ec = data;
    Eina_List *l, *ll;
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
    if (!ec->comp_data->sub.list) return;
    EINA_LIST_FOREACH(ec->comp_data->sub.list, l, sec)
      evas_object_layer_set(sec->frame, evas_object_layer_get(ec->frame));
@@ -556,6 +560,7 @@ _e_comp_wl_evas_cb_move(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_U
    E_Client *sec, *ec = data;
    Eina_List *l;
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
    EINA_LIST_FOREACH(ec->comp_data->sub.list, l, sec)
      {
         if (!sec->comp_data->sub.data->position.set)
@@ -570,6 +575,7 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj 
EINA_UNUSED, void *event
    E_Client *ec;
 
    if (!(ec = data)) return;
+   if (e_object_is_del(E_OBJECT(ec))) return;
 
    if ((ec->shading) || (ec->shaded)) return;
    if (!ec->comp_data->shell.configure_send) return;
@@ -688,6 +694,7 @@ _e_comp_wl_evas_cb_ping(void *data, Evas_Object *obj 
EINA_UNUSED, void *event EI
    E_Client *ec;
 
    if (!(ec = data)) return;
+   if (e_object_is_del(E_OBJECT(ec))) return;
    if (!(ec->comp_data->shell.ping)) return;
    if (!(ec->comp_data->shell.surface)) return;
 

-- 


Reply via email to