From patchwork Thu Apr 4 07:28:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 233651 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A66922C00E4 for ; Thu, 4 Apr 2013 18:29:57 +1100 (EST) Received: from localhost ([::1]:48344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNecN-0007Kn-8Y for incoming@patchwork.ozlabs.org; Thu, 04 Apr 2013 03:29:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNebk-0007IB-Ds for qemu-devel@nongnu.org; Thu, 04 Apr 2013 03:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNebe-0004tJ-GL for qemu-devel@nongnu.org; Thu, 04 Apr 2013 03:29:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNebe-0004tC-90 for qemu-devel@nongnu.org; Thu, 04 Apr 2013 03:29:10 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r347T8Wr012022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Apr 2013 03:29:08 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r347T78u007368; Thu, 4 Apr 2013 03:29:07 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id C23A140D3E; Thu, 4 Apr 2013 09:29:06 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 4 Apr 2013 09:28:44 +0200 Message-Id: <1365060546-24638-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1365060546-24638-1-git-send-email-kraxel@redhat.com> References: <1365060546-24638-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Igor Mitsyanko , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 02/24] hw/vmware_vga.c: fix screen resize bug introduced after console revamp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Igor Mitsyanko 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 Signed-off-by: Gerd Hoffmann --- hw/vmware_vga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);