qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix crash on resolution change -> screen dump -> vga redraw
@ 2009-04-07  9:33 Avi Kivity
  2009-04-07 20:56 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2009-04-07  9:33 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, kvm

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>
---
 hw/vga.c |    1 +
 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);
 }
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-07 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07  9:33 [Qemu-devel] [PATCH] Fix crash on resolution change -> screen dump -> vga redraw Avi Kivity
2009-04-07 20:56 ` [Qemu-devel] " Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).