On 19/3/23 12:10, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> VNC code relies on con==NULL to mean the default console.
>
Reported-by: Helge Konetzka <hk@zapateado.de>
> Fixes:
> https://gitlab.com/qemu-project/qemu/-/issues/1548
TIL this multi-lines pattern works!
"You can use the closing patterns in multi-line commit
messages or one-liners"
https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#default-closing-pattern
> Fixes: commit 385ac97f8 ("ui: keep current cursor with QemuConsole")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> ui/console.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/ui/console.c b/ui/console.c
> index f3783021e5..6e8a3cdc62 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;
> }
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>