It's possible for a pointer's focus to be null, e.g. because
the focus surface has been bestroyed. Prevent a crash when
that happens and a client takes too long to respond to a ping.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
shsurf->unresponsive = 1;
wl_list_for_each(seat, &shsurf->surface->compositor->seat_list, link)
- if (seat->pointer->focus->surface == shsurf->surface)
+ if (seat->pointer->focus &&
+ seat->pointer->focus->surface == shsurf->surface)
set_busy_cursor(shsurf, seat->pointer);
return 1;