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.
This commit is contained in:
Giulio Camuffo 2013-07-07 17:38:50 +02:00 committed by Kristian Høgsberg
parent c077a8435d
commit 708b8af018

View File

@ -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;