From: Marc-André Lureau Date: Sun, 19 Mar 2023 11:10:17 +0000 (+0400) Subject: ui: return the default console cursor when con == NULL X-Git-Tag: v8.0.0-rc1~2^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c293a46627063eb4b12d808c7ec43b1cff8e463;p=thirdparty%2Fqemu.git ui: return the default console cursor when con == NULL VNC code relies on con==NULL to mean the default console. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1548 Fixes: commit 385ac97f8 ("ui: keep current cursor with QemuConsole") Signed-off-by: Marc-André Lureau Reported-by: Helge Konetzka Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230319111017.1319880-1-marcandre.lureau@redhat.com> --- diff --git a/ui/console.c b/ui/console.c index f3783021e56..6e8a3cdc62d 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2303,6 +2303,9 @@ QemuConsole *qemu_console_lookup_unused(void) QEMUCursor *qemu_console_get_cursor(QemuConsole *con) { + if (con == NULL) { + con = active_console; + } return con->cursor; }