qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: lichun <lichun@ruijie.com.cn>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [PULL 2/6] console: avoid passing con=NULL to graphic_hw_update_done()
Date: Fri, 13 Nov 2020 13:29:51 +0100	[thread overview]
Message-ID: <20201113122955.759-3-kraxel@redhat.com> (raw)
In-Reply-To: <20201113122955.759-1-kraxel@redhat.com>

From: lichun <lichun@ruijie.com.cn>

In graphic_hw_update(), first select an existing console,
a specific-console or active_console(if not specified),
then updating the console.

Signed-off-by: lichun <lichun@ruijie.com.cn>
Message-id: 1604682219-114389-1-git-send-email-lichun@ruijie.com.cn
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/console.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ui/console.c b/ui/console.c
index e8e59707d38c..e07d2c380df7 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -270,10 +270,11 @@ void graphic_hw_update_done(QemuConsole *con)
 void graphic_hw_update(QemuConsole *con)
 {
     bool async = false;
+    con = con ? con : active_console;
     if (!con) {
-        con = active_console;
+        return;
     }
-    if (con && con->hw_ops->gfx_update) {
+    if (con->hw_ops->gfx_update) {
         con->hw_ops->gfx_update(con->hw);
         async = con->hw_ops->gfx_update_async;
     }
-- 
2.27.0



  parent reply	other threads:[~2020-11-13 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 12:29 [PULL 0/6] Fixes 20201113 patches Gerd Hoffmann
2020-11-13 12:29 ` [PULL 1/6] audio/jack: fix use after free segfault Gerd Hoffmann
2020-11-13 12:29 ` Gerd Hoffmann [this message]
2020-11-13 12:29 ` [PULL 3/6] hw/usb/Kconfig: Fix USB_XHCI_NEC (depends on USB_XHCI_PCI) Gerd Hoffmann
2020-11-13 12:29 ` [PULL 4/6] hw/display/cirrus_vga: Remove debugging code commented out Gerd Hoffmann
2020-11-13 12:29 ` [PULL 5/6] hw/display/cirrus_vga: Fix hexadecimal format string specifier Gerd Hoffmann
2020-11-13 12:29 ` [PULL 6/6] xhci: fix nec-usb-xhci properties Gerd Hoffmann
2020-11-13 13:40 ` [PULL 0/6] Fixes 20201113 patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201113122955.759-3-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=lichun@ruijie.com.cn \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).