Fix crash when processing a wayland client cursor set after death

It looks like the only way we can get here with NULL resource data
is when we explicitly cleared it in the del hook, meaning the client
is dead to us.  In this case it's ok to ignore the cursor set request.

ref T4988
This commit is contained in:
Derek Foreman 2017-09-08 14:38:08 -05:00 committed by Mike Blumenkrantz
parent 4cd2a7b47d
commit 8ca6f02914
1 changed files with 6 additions and 0 deletions

View File

@ -79,6 +79,12 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
return;
}
ec = wl_resource_get_user_data(surface_resource);
/* I think this only happens when we've deleted the resource from
* the client del callback - so the client is gone and shouldn't be
* setting a cursor, but the surface still exists so stale requests
* are being processed... let's BAIL.
*/
if (!ec) return;
if (!ec->re_manage)
{
ec->comp_data->cursor = ec->re_manage = 1;