From: Rob Bradford Date: Mon, 20 May 2013 11:09:20 +0000 (+0100) Subject: shell: End grab if the grabbed shell surface has been destroyed X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f8d9aacfa940af2c9424224c90ac2b77b0a4f58;p=platform%2Fupstream%2Fweston.git shell: End grab if the grabbed shell surface has been destroyed The shell_grab_start function sets up a destroy notification on the shell surface such that when the shell surface is destroyed the pointer on the grab to the shell surface is set to NULL. We must therefore check whether the shell surface is NULL and end the grab if it is. https://bugs.freedesktop.org/show_bug.cgi?id=64689 --- diff --git a/src/shell.c b/src/shell.c index f5d5bff..7261570 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); }