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>
This commit is contained in:
committed by
Daniel Stone
parent
db776dbecf
commit
3b7c207d06
@@ -3084,6 +3084,11 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
|
|||||||
struct input *input = data;
|
struct input *input = data;
|
||||||
struct window *window;
|
struct window *window;
|
||||||
|
|
||||||
|
if (!surface) {
|
||||||
|
/* enter event for a window we've just destroyed */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
input->display->serial = serial;
|
input->display->serial = serial;
|
||||||
input->keyboard_focus = wl_surface_get_user_data(surface);
|
input->keyboard_focus = wl_surface_get_user_data(surface);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user