window: Check for NULL surface in keyboard_handle_enter

This can happen if you right-click in weston-terminal a few times very quickly.
The pointer_handle_enter callback already checks for NULL, so let's do that in
keyboard_handle_enter, too.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
Dima Ryazanov 8 years ago committed by Daniel Stone
parent db776dbecf
commit 3b7c207d06
  1. 5
      clients/window.c

@ -3084,6 +3084,11 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
struct input *input = data;
struct window *window;
if (!surface) {
/* enter event for a window we've just destroyed */
return;
}
input->display->serial = serial;
input->keyboard_focus = wl_surface_get_user_data(surface);

Loading…
Cancel
Save