aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-05-20 15:23:06 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-01 12:53:36 -0500
commit26572b8a0e90ee0c77587173a78fa293a1d2beb6 (patch)
treeaf53e79866c62612cd07bbcfc88e6cfd93328ca9
parent4091da4b7cc251c7d422ccc5707900ed595b1ee0 (diff)
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 <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--console.c2
1 files changed, 1 insertions, 1 deletions
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);
}