derekf pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3313f0f26dfcb90a91dbd6dc4a16a659f9372a7d

commit 3313f0f26dfcb90a91dbd6dc4a16a659f9372a7d
Author: Derek Foreman <[email protected]>
Date:   Wed Nov 30 10:19:40 2016 -0600

    Fix crash on xdg shell unbind
    
    Running weston-simple-dmabuf-intel and killing it could crash E in
    xdg_shell_unbind.
---
 src/modules/wl_desktop_shell/xdg6.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index c6926e9..b323385 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -1336,11 +1336,14 @@ _e_xdg_shell_cb_unbind(struct wl_resource *resource)
         E_Client *ec = wl_resource_get_user_data(res);
         E_Shell_Data *shd;
 
-        if (ec->comp_data->shell.surface)
-          e_shell_surface_cb_destroy(ec->comp_data->shell.surface);
-        shd = ec->comp_data->shell.data;
-        if (shd)
-          e_shell_surface_cb_destroy(shd->surface);
+        if (!e_object_is_del(E_OBJECT(ec)))
+          {
+             if (ec->comp_data->shell.surface)
+               e_shell_surface_cb_destroy(ec->comp_data->shell.surface);
+             shd = ec->comp_data->shell.data;
+             if (shd)
+               e_shell_surface_cb_destroy(shd->surface);
+          }
         v->surfaces = eina_list_remove_list(v->surfaces, l);
      }
 

-- 


Reply via email to