From a319cc813c7810addf2efada354d0fa7feaf15a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 28 Nov 2019 19:46:27 +0100 Subject: [PATCH] input: keyboard/pointer_enter: assert surface != NULL --- input.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/input.c b/input.c index dc5ca77d..db66cd07 100644 --- a/input.c +++ b/input.c @@ -83,10 +83,13 @@ static void keyboard_enter(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys) { + assert(surface != NULL); + struct wayland *wayl = data; wayl->input_serial = serial; wayl->focused = wayl_terminal_from_surface(wayl, surface); assert(wayl->focused != NULL); + term_focus_in(wayl->focused); term_xcursor_update(wayl->focused); } @@ -426,6 +429,8 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t surface_x, wl_fixed_t surface_y) { + assert(surface != NULL); + struct wayland *wayl = data; struct terminal *term = wayl_terminal_from_surface(wayl, surface);