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>
diff --git a/src/input.c b/src/input.c
index c881792..8fe898c 100644
--- a/src/input.c
+++ b/src/input.c
@@ -367,6 +367,9 @@
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) >=