Received: from eggs.gnu.org ([208.118.235.92]:60676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI2TC-00058G-SB for qemu-devel@nongnu.org; Tue, 19 Mar 2013 15:45:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI2T7-00044P-E9 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 15:45:14 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:44926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI2T7-00041v-82 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 15:45:09 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MJX002D4AV6F590@mailout4.w1.samsung.com> for qemu-devel@nongnu.org; Tue, 19 Mar 2013 19:45:07 +0000 (GMT) Received: from mitsyankoPC.rnd.samsung.ru ([106.109.129.86]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MJX008ZMAUWFTA0@eusync2.samsung.com> for qemu-devel@nongnu.org; Tue, 19 Mar 2013 19:45:07 +0000 (GMT) From: Igor Mitsyanko Date: Tue, 19 Mar 2013 23:44:56 +0400 Message-id: <1363722296-29940-3-git-send-email-i.mitsyanko@gmail.com> In-reply-to: <1363722296-29940-1-git-send-email-i.mitsyanko@gmail.com> References: <1363722296-29940-1-git-send-email-i.mitsyanko@gmail.com> Subject: [Qemu-devel] [PATCH 2/2] hw/vmware_vga.c: fix screen resize bug introduced after console revamp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, kraxel@redhat.com, i.mitsyanko@samsung.com 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 --- hw/vmware_vga.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 5b9ce8f..c0aac31 100644 --- a/hw/vmware_vga.c +++ b/hw/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); -- 1.7.5.4