[PATCH weston] input: Don't try to send pointer frames if no focus_client

Derek Foreman derekf at osg.samsung.com
Fri Jan 29 08:29:46 PST 2016


Prevents a segfault when mousing into clients that don't get_pointer
like weston-simple-shm and weston-simple-damage.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 src/input.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/input.c b/src/input.c
index 91813ec..2539fa7 100644
--- a/src/input.c
+++ b/src/input.c
@@ -390,6 +390,9 @@ weston_pointer_send_frame(struct weston_pointer *pointer)
 	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)
 		pointer_send_frame(resource);
-- 
2.7.0



More information about the wayland-devel mailing list