summaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c
index f5d5bfff..72615702 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1296,7 +1296,7 @@ busy_cursor_grab_focus(struct weston_pointer_grab *base)
pointer->x, pointer->y,
&sx, &sy);
- if (grab->shsurf->surface != surface) {
+ if (!grab->shsurf || grab->shsurf->surface != surface) {
shell_grab_end(grab);
free(grab);
}