shell: Make sure we actually have a resource in end_busy_cursor
It's actually possible to get here after the surface has been destroyed, especially when running client apps under valgrind. That probably shouldn't be able to segfault the compositor. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
parent
ca510d06dc
commit
c0c1497f99
@ -2119,6 +2119,7 @@ end_busy_cursor(struct weston_compositor *compositor, struct wl_client *client)
|
||||
|
||||
grab = (struct shell_grab *) pointer->grab;
|
||||
if (grab->grab.interface == &busy_cursor_grab_interface &&
|
||||
grab->shsurf->resource &&
|
||||
wl_resource_get_client(grab->shsurf->resource) == client) {
|
||||
shell_grab_end(grab);
|
||||
free(grab);
|
||||
|
Loading…
x
Reference in New Issue
Block a user