From 26572b8a0e90ee0c77587173a78fa293a1d2beb6 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 20 May 2010 15:23:06 +0200 Subject: [PATCH] check for active_console before using it Other vga_hw_* functions do the same. Fixes a segmentation fault. Trigger: boot with -nodefaults, then connect via vnc. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.c b/console.c index 7070b1b1a..4c42b2810 100644 --- a/console.c +++ b/console.c @@ -167,7 +167,7 @@ void vga_hw_update(void) void vga_hw_invalidate(void) { - if (active_console->hw_invalidate) + if (active_console && active_console->hw_invalidate) active_console->hw_invalidate(active_console->hw); } -- 2.39.2