[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/6] console: avoid passing con=NULL to graphic_hw_update_done()
From: |
Gerd Hoffmann |
Subject: |
[PULL 2/6] console: avoid passing con=NULL to graphic_hw_update_done() |
Date: |
Fri, 13 Nov 2020 13:29:51 +0100 |
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
- [PULL 0/6] Fixes 20201113 patches, Gerd Hoffmann, 2020/11/13
- [PULL 3/6] hw/usb/Kconfig: Fix USB_XHCI_NEC (depends on USB_XHCI_PCI), Gerd Hoffmann, 2020/11/13
- [PULL 6/6] xhci: fix nec-usb-xhci properties, Gerd Hoffmann, 2020/11/13
- [PULL 4/6] hw/display/cirrus_vga: Remove debugging code commented out, Gerd Hoffmann, 2020/11/13
- [PULL 1/6] audio/jack: fix use after free segfault, Gerd Hoffmann, 2020/11/13
- [PULL 5/6] hw/display/cirrus_vga: Fix hexadecimal format string specifier, Gerd Hoffmann, 2020/11/13
- [PULL 2/6] console: avoid passing con=NULL to graphic_hw_update_done(),
Gerd Hoffmann <=
- Re: [PULL 0/6] Fixes 20201113 patches, Peter Maydell, 2020/11/13