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 <marcandre.lureau@redhat.com>
Reported-by: Helge Konetzka <hk@zapateado.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230319111017.1319880-1-marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2023-03-19 15:10:17 +04:00
parent 281a77df28
commit 3c293a4662
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}