[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/33] ui: return NULL when getting cursor without a console
From: |
marcandre . lureau |
Subject: |
[PULL 01/33] ui: return NULL when getting cursor without a console |
Date: |
Tue, 27 Jun 2023 15:01:58 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
VNC may try to get the current cursor even when there are no consoles
and crashes. Simple reproducer is qemu with -nodefaults.
Fixes: (again)
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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230428154807.2143652-1-marcandre.lureau@redhat.com>
---
ui/console.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/console.c b/ui/console.c
index e173731e20..7461446e71 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2306,7 +2306,7 @@ QEMUCursor *qemu_console_get_cursor(QemuConsole *con)
if (con == NULL) {
con = active_console;
}
- return con->cursor;
+ return con ? con->cursor : NULL;
}
bool qemu_console_is_visible(QemuConsole *con)
--
2.41.0
- [PULL 00/33] UI patches, marcandre . lureau, 2023/06/27
- [PULL 08/33] virtio-gpu: Make non-gl display updates work again when blob=true, marcandre . lureau, 2023/06/27
- [PULL 02/33] egl: no need to lookup EGL functions manually, marcandre . lureau, 2023/06/27
- [PULL 06/33] ui/touch: Move event handling to a common helper, marcandre . lureau, 2023/06/27
- [PULL 05/33] chardev/char-win-stdio: Support VT sequences on Windows 11 host, marcandre . lureau, 2023/06/27
- [PULL 04/33] virtio-gpu: Optimize 2D resource data transfer, marcandre . lureau, 2023/06/27
- [PULL 03/33] ui/sdl2: OpenGL window context, marcandre . lureau, 2023/06/27
- [PULL 07/33] ui/dbus: Expose a touch device interface, marcandre . lureau, 2023/06/27
- [PULL 01/33] ui: return NULL when getting cursor without a console,
marcandre . lureau <=
- [PULL 15/33] ui/dbus: compile without gio/gunixfdlist.h, marcandre . lureau, 2023/06/27
- [PULL 12/33] ui/gtk: making dmabuf NULL when it's released., marcandre . lureau, 2023/06/27
- [PULL 09/33] virtio-gpu-udmabuf: create udmabuf for blob even when iov_cnt == 1, marcandre . lureau, 2023/06/27
- [PULL 18/33] qtest: add qtest_pid(), marcandre . lureau, 2023/06/27
- [PULL 16/33] scripts: add a XML preprocessor script, marcandre . lureau, 2023/06/27
- [PULL 14/33] ui/egl: fix make_context_current() callback return value, marcandre . lureau, 2023/06/27
- [PULL 13/33] ui/egl: export qemu_egl_get_error_string(), marcandre . lureau, 2023/06/27
- [PULL 19/33] tests: make dbus-display-test work on win32, marcandre . lureau, 2023/06/27
- [PULL 23/33] ui/dbus: use shared memory when possible on win32, marcandre . lureau, 2023/06/27
- [PULL 24/33] ui: add egl-headless support on win32, marcandre . lureau, 2023/06/27