aboutsummaryrefslogtreecommitdiff
path: root/hw/vga.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 20:55:58 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 20:55:58 +0000
commit9d1b494a2d5dd2c129994edcf4eb7630bb554964 (patch)
tree2898f5aa43c4a2e260538d571168c865b2bb1f79 /hw/vga.c
parent799e709b43a8a2ca19db3153d45f0eba934025c2 (diff)
downloadqemu-9d1b494a2d5dd2c129994edcf4eb7630bb554964.zip
qemu-9d1b494a2d5dd2c129994edcf4eb7630bb554964.tar.gz
qemu-9d1b494a2d5dd2c129994edcf4eb7630bb554964.tar.bz2
Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity)
The vga screen dump function updates last_width and last_height, but does not change the DisplaySurface that these variables describe. A consequent vga_draw_graphic() will therefore fail to resize the surface and crash. Fix by invalidating the display state after a screen dump, forcing vga_draw_graphic() to reallocate the DisplaySurface. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7026 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vga.c')
-rw-r--r--hw/vga.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vga.c b/hw/vga.c
index b1e4373..4d1049b 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2678,4 +2678,5 @@ static void vga_screen_dump(void *opaque, const char *filename)
vga_screen_dump_graphic(s, filename);
else
vga_screen_dump_text(s, filename);
+ vga_invalidate_display(s);
}