From ba09d55aabb8979a305c13afe8d51f98e5118410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 3 Jul 2023 14:26:01 +0200 Subject: [PATCH] term_xcursor_update_for_seat(): fix missing evaluation of render_xcursor_is_valid() When compiling *without* cursor-shape-v1 support, term_xcursor_update_for_seat() would incorrectly set shape=CURSOR_SHAPE_CUSTOM, even though no custom cursor had been set by the user. This resulted in a crash in render_xcursor_set(), when trying to use a NULL-string as custom cursor. --- terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index 2d1313c1..fff55019 100644 --- a/terminal.c +++ b/terminal.c @@ -3133,7 +3133,7 @@ term_xcursor_update_for_seat(struct terminal *term, struct seat *seat) #if defined(HAVE_CURSOR_SHAPE) else if (cursor_string_to_server_shape(term->mouse_user_cursor) != 0 #else - else if (true + else if (false #endif || render_xcursor_is_valid(seat, term->mouse_user_cursor)) {