summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-06-15 15:19:32 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-06-15 15:19:32 -0500
commit2463ce8b4349199102bc3f7281ff8c3400732d5a (patch)
treea1851d88df4b8240805dd2d7b0a34b9d9a9e1a4d
parent771f71e6a9db7b33d955d63e03cabbfcc5516af7 (diff)
downloadenlightenment-2463ce8b4349199102bc3f7281ff8c3400732d5a.tar.gz
Fix crash in wl_shell surface destroy
wl_shell doesn't set up shell.data, but this destructor is shared with xdg_shell which does.
-rw-r--r--src/modules/wl_desktop_shell/e_mod_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c
index f599acaaaa..6c0a05e8fa 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -135,8 +135,12 @@ _e_shell_surface_destroy(struct wl_resource *resource)
{
E_Shell_Data *shd = ec->comp_data->shell.data;
- E_FREE_LIST(shd->pending, free);
- E_FREE(ec->comp_data->shell.data);
+ if (shd)
+ {
+ E_FREE_LIST(shd->pending, free);
+ E_FREE(ec->comp_data->shell.data);
+ }
+
if (ec->comp_data->mapped)
{
if ((ec->comp_data->shell.surface) &&