unset wl shell resource data on destroy

ensure that destroy cannot be called multiple times for the same resource
This commit is contained in:
Mike Blumenkrantz 2017-03-22 16:15:15 -04:00
parent 7e05eff3e3
commit d589e5217b
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ e_shell_surface_destroy(struct wl_resource *resource)
/* get the client for this resource */
ec = wl_resource_get_user_data(resource);
if (!ec) return;
wl_resource_set_user_data(resource, NULL);
/* client may be passed here during DEL hook */
if (!ec->comp_data) return;