From: aliguori Date: Fri, 10 Apr 2009 18:36:38 +0000 (+0000) Subject: Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity) X-Git-Tag: xen-3.4.0-rc2~1^2~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=da95f49a9d0bc9597bd2c4ab5a7ee9bea7c4b01d;p=qemu-xen-4.0-testing.git 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 Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@7069 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/hw/vga.c b/hw/vga.c index 2a9f4d9d..709d6bb9 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); }