summaryrefslogtreecommitdiff
path: root/desktop-shell/shell.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2014-01-01 16:28:32 -0800
committerKristian Høgsberg <krh@bitplanet.net>2014-01-01 16:28:32 -0800
commit7c4f6cc145daf66cd9624f1e70dd5278241f5858 (patch)
tree7bdaea111c708d6ab085cc47a63680dc478b0699 /desktop-shell/shell.c
parent8662349394fc4d14389c973c3f00e3d580ed5b4c (diff)
shell: Only assign focus on click if there is a pointer focus surface
If we don't have a background image from the desktop-shell client or the pointer for some other reason doesn't have a focus we trigger a segfault as we try to deref the seat->pointer->focus NULL pointer. https://bugs.freedesktop.org/show_bug.cgi?id=73066
Diffstat (limited to 'desktop-shell/shell.c')
-rw-r--r--desktop-shell/shell.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 7981099a..e22c97fa 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -4216,6 +4216,8 @@ click_to_activate_binding(struct weston_seat *seat, uint32_t time, uint32_t butt
{
if (seat->pointer->grab != &seat->pointer->default_grab)
return;
+ if (seat->pointer->focus == NULL)
+ return;
activate_binding(seat, data, seat->pointer->focus->surface);
}