[PATCH weston 4/4] input: Don't try to send axis_source when there are no resources

Jonas Ådahl jadahl at gmail.com
Thu Apr 21 03:09:56 UTC 2016


We miss to NULL check the focus_client, which is only non-NULL when
there the focused client has any resources.

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

Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
---
 src/input.c | 3 +++
 1 file changed, 3 insertions(+)

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 @@ 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) >=
-- 
2.5.5



More information about the wayland-devel mailing list