From: Gerd Hoffmann Date: Thu, 20 May 2010 13:23:06 +0000 (+0200) Subject: check for active_console before using it X-Git-Tag: last_qemu_master~30 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=26572b8a0e90ee0c77587173a78fa293a1d2beb6;p=qemu-xen-unstable.git 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 --- diff --git a/console.c b/console.c index 7070b1b1ad..4c42b2810c 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); }