From f3226bc5eba53ce4b0306546e99f5928198526c3 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 18 Sep 2026 07:50:39 +0200 Subject: ime: ignore enter events with a NULL surface Closes #2467 --- ime.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ime.c') diff --git a/ime.c b/ime.c index fa0e2cee..388ed097 100644 --- a/ime.c +++ b/ime.c @@ -55,6 +55,12 @@ static void enter(void *data, struct zwp_text_input_v3 *zwp_text_input_v3, struct wl_surface *surface) { + if (unlikely(surface == NULL)) { + /* Seen on Hyprland */ + LOG_WARN("compositor sent ime_enter event with a NULL surface"); + return; + } + struct seat *seat = data; struct wl_window *win = wl_surface_get_user_data(surface); struct terminal *term = win->term; -- cgit v1.3