diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2016-06-15 15:19:32 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2016-06-15 15:19:32 -0500 |
commit | 2463ce8b4349199102bc3f7281ff8c3400732d5a (patch) | |
tree | a1851d88df4b8240805dd2d7b0a34b9d9a9e1a4d | |
parent | 771f71e6a9db7b33d955d63e03cabbfcc5516af7 (diff) | |
download | enlightenment-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.c | 8 |
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) && |