diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-11-24 13:29:36 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-11-25 12:33:21 +0100 |
commit | 6fc5183a65b59d43441296cd2f72f8e55dc5dd04 (patch) | |
tree | a47e330c656b6dc3915ac9dcc024c6f28714165b /ui/console.c | |
parent | dd3d2340c4076d1735cd0f7cb61f4d8622b9562d (diff) | |
download | qemu-6fc5183a65b59d43441296cd2f72f8e55dc5dd04.zip qemu-6fc5183a65b59d43441296cd2f72f8e55dc5dd04.tar.gz qemu-6fc5183a65b59d43441296cd2f72f8e55dc5dd04.tar.bz2 |
qxl: fix segfault
Add missing sanity check.
Reproducer: run qemu with "-device qxl" but without "-spice ..."
Fixes: 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20201124122936.30588-1-kraxel@redhat.com
Diffstat (limited to 'ui/console.c')
-rw-r--r-- | ui/console.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/console.c b/ui/console.c index e07d2c3..53dee8e 100644 --- a/ui/console.c +++ b/ui/console.c @@ -264,7 +264,9 @@ static void gui_setup_refresh(DisplayState *ds) void graphic_hw_update_done(QemuConsole *con) { - qemu_co_queue_restart_all(&con->dump_queue); + if (con) { + qemu_co_queue_restart_all(&con->dump_queue); + } } void graphic_hw_update(QemuConsole *con) |