From: Emilio Pozuelo Monfort Date: Fri, 22 Nov 2013 15:21:20 +0000 (+0100) Subject: shell: don't crash if a pointer's focus is null X-Git-Tag: upstream/0.1.8~706 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d0fc76dd5069b813ab636d6ca199ea0e494748f;p=profile%2Fivi%2Fweston-ivi-shell.git shell: don't crash if a pointer's focus is null 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 --- diff --git a/src/shell.c b/src/shell.c index 0d386cf..f102e9a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1866,7 +1866,8 @@ ping_timeout_handler(void *data) 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;