diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/console.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/console.c b/ui/console.c index f995639e45..30e70be555 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1544,19 +1544,27 @@ static void dpy_set_ui_info_timer(void *opaque) bool dpy_ui_info_supported(QemuConsole *con) { + if (con == NULL) { + con = active_console; + } + return con->hw_ops->ui_info != NULL; } const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con) { - assert(con != NULL); + if (con == NULL) { + con = active_console; + } return &con->ui_info; } int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info) { - assert(con != NULL); + if (con == NULL) { + con = active_console; + } if (!dpy_ui_info_supported(con)) { return -1; |