console: avoid passing con=NULL to graphic_hw_update_done()
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>
This commit is contained in:
parent
a6e037390d
commit
1cd8b94870
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user