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.
This commit is contained in:
Daniel Eklöf 2023-07-03 14:26:01 +02:00
parent 8fc43ccd2d
commit ba09d55aab
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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))
{