3dcd9a4
From 9d1b494a2d5dd2c129994edcf4eb7630bb554964 Mon Sep 17 00:00:00 2001
3dcd9a4
From: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
3dcd9a4
Date: Tue, 7 Apr 2009 20:55:58 +0000
3dcd9a4
Subject: [PATCH 1/1] Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity)
910c5e3
3dcd9a4
The vga screen dump function updates last_width and last_height,
3dcd9a4
but does not change the DisplaySurface that these variables describe.
3dcd9a4
A consequent vga_draw_graphic() will therefore fail to resize the
3dcd9a4
surface and crash.
910c5e3
3dcd9a4
Fix by invalidating the display state after a screen dump, forcing
3dcd9a4
vga_draw_graphic() to reallocate the DisplaySurface.
910c5e3
910c5e3
Signed-off-by: Avi Kivity <avi@redhat.com>
3dcd9a4
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
3dcd9a4
3dcd9a4
3dcd9a4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7026 c046a42c-6fe2-441c-8c8c-71466251a162
910c5e3
---
3dcd9a4
 qemu/hw/vga.c |    1 +
3dcd9a4
 1 files changed, 1 insertions(+), 0 deletions(-)
910c5e3
910c5e3
diff --git a/qemu/hw/vga.c b/qemu/hw/vga.c
3dcd9a4
index b1e4373..4d1049b 100644
910c5e3
--- a/qemu/hw/vga.c
910c5e3
+++ b/qemu/hw/vga.c
3dcd9a4
@@ -2678,4 +2678,5 @@ static void vga_screen_dump(void *opaque, const char *filename)
3dcd9a4
         vga_screen_dump_graphic(s, filename);
3dcd9a4
     else
3dcd9a4
         vga_screen_dump_text(s, filename);
3dcd9a4
+    vga_invalidate_display(s);
910c5e3
 }
910c5e3
-- 
910c5e3
1.6.0.6
910c5e3