summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/console.c b/console.c
index 4bc16e8d1..dbb3b7010 100644
--- a/console.c
+++ b/console.c
@@ -1431,6 +1431,8 @@ void text_consoles_set_display(DisplayState *ds)
void qemu_console_resize(DisplayState *ds, int width, int height)
{
TextConsole *s = get_graphic_console(ds);
+ if (!s) return;
+
s->g_width = width;
s->g_height = height;
if (is_graphic_console()) {