aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Mitsyanko <i.mitsyanko@gmail.com>2013-03-19 23:44:56 +0400
committerGerd Hoffmann <kraxel@redhat.com>2013-04-16 09:03:46 +0200
commit17866fc888445ec7d2568645df45bb47e6be01de (patch)
treeafc7d3c887f630fa64d48cf7480525bfebf5d8a4
parent522fccbe71e35efc96f66cb475f778c2ce02e9fc (diff)
hw/vmware_vga.c: fix screen resize bug introduced after console revamp
In vmsvga display update function, a pointer to DisplaySurface must be acquired after a call to vmsvga_check_size since this function might replace current DisplaySurface with a new one. Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--hw/display/vmware_vga.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index bcad47a68d..2233a8bede 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -995,7 +995,7 @@ static inline void vmsvga_check_size(struct vmsvga_state_s *s)
static void vmsvga_update_display(void *opaque)
{
struct vmsvga_state_s *s = opaque;
- DisplaySurface *surface = qemu_console_surface(s->vga.con);
+ DisplaySurface *surface;
bool dirty = false;
if (!s->enable) {
@@ -1004,6 +1004,7 @@ static void vmsvga_update_display(void *opaque)
}
vmsvga_check_size(s);
+ surface = qemu_console_surface(s->vga.con);
vmsvga_fifo_run(s);
vmsvga_update_rect_flush(s);