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.
dev
Giulio Camuffo 12 years ago committed by Kristian Høgsberg
parent c077a8435d
commit 708b8af018
  1. 2
      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, wl_resource_set_implementation(cr, &pointer_interface, seat->pointer,
unbind_resource); unbind_resource);
if (seat->pointer->focus && if (seat->pointer->focus && seat->pointer->focus->resource &&
wl_resource_get_client(seat->pointer->focus->resource) == client) { wl_resource_get_client(seat->pointer->focus->resource) == client) {
struct weston_surface *surface; struct weston_surface *surface;
wl_fixed_t sx, sy; wl_fixed_t sx, sy;

Loading…
Cancel
Save