From 708b8af01845df02e23901e0762e6eca16ca12ce Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Sun, 7 Jul 2013 17:38:50 +0200 Subject: [PATCH] input: check if the resource is valid in seat_get_pointer seat->pointer->focus->resource can be NULL, if the surface was created with weston_surface_create. --- src/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input.c b/src/input.c index 644487a4..a7a37e5b 100644 --- a/src/input.c +++ b/src/input.c @@ -1181,7 +1181,7 @@ seat_get_pointer(struct wl_client *client, struct wl_resource *resource, wl_resource_set_implementation(cr, &pointer_interface, seat->pointer, unbind_resource); - if (seat->pointer->focus && + if (seat->pointer->focus && seat->pointer->focus->resource && wl_resource_get_client(seat->pointer->focus->resource) == client) { struct weston_surface *surface; wl_fixed_t sx, sy;