input: Don't try to send axis_source when there are no resources

The focus_client pointer may be NULL here if the focused client has no
pointer resources. To avoid a crash, NULL check focus client before
proceeding to send the events.

https://bugs.freedesktop.org/show_bug.cgi?id=94899

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
dev
Jonas Ådahl 9 years ago
parent 8b6c9fcd4e
commit ed6014a9e4
  1. 3
      src/input.c

@ -367,6 +367,9 @@ weston_pointer_send_axis_source(struct weston_pointer *pointer, uint32_t source)
struct wl_resource *resource;
struct wl_list *resource_list;
if (!pointer->focus_client)
return;
resource_list = &pointer->focus_client->pointer_resources;
wl_resource_for_each(resource, resource_list) {
if (wl_resource_get_version(resource) >=

Loading…
Cancel
Save