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.
This commit is contained in:
Derek Foreman 2016-06-15 15:19:32 -05:00
parent 771f71e6a9
commit 2463ce8b43
1 changed files with 6 additions and 2 deletions

View File

@ -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) &&