summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2014-06-18 17:48:58 +0200
committerKristian Høgsberg <krh@bitplanet.net>2014-06-23 13:41:30 -0700
commit5872b6821be7c9c0a17a0de962e3f4a04f5d0c6f (patch)
tree17dddcf1f517882c62243d85d1936258e2be0a39 /desktop-shell
parent28ee518305153a0ea0b058503c6fc785f646e719 (diff)
downloadweston-5872b6821be7c9c0a17a0de962e3f4a04f5d0c6f.tar.gz
desktop-shell: Don't assume there is a pointer when resizing
Fixes a crash on touch devices without a pointer, when touching the window frame of a client. Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 48b9faf4..d267cde2 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1849,7 +1849,8 @@ common_surface_resize(struct wl_resource *resource,
struct shell_surface *shsurf = wl_resource_get_user_data(resource);
struct weston_surface *surface;
- if (seat->pointer->button_count == 0 ||
+ if (seat->pointer == NULL ||
+ seat->pointer->button_count == 0 ||
seat->pointer->grab_serial != serial ||
seat->pointer->focus == NULL)
return;