summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-09-11 14:30:39 -0500
committerBryce Harrington <bryce@osg.samsung.com>2015-09-14 11:33:31 -0700
commitc0c1497f999cea4d488ed334636b00b227fdca13 (patch)
treee8e5f47eb6fa62d79234382a16061899f30a8024 /desktop-shell
parentca510d06dca3e47e434a50cee105e96c9e82599c (diff)
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>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 034d39b9..ecc42c56 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -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);