Ensure that it only get called when dpy_ui_info_supported(). The
function should always return a result. There should be a non-null
console or active_console.
Modify the argument to be const as well.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Albert Esteve <aesteve@redhat.com>
uint64_t interval);
void unregister_displaychangelistener(DisplayChangeListener *dcl);
-bool dpy_ui_info_supported(QemuConsole *con);
+bool dpy_ui_info_supported(const QemuConsole *con);
const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con);
int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info, bool delay);
con->hw_ops->ui_info(con->hw, head, &con->ui_info);
}
-bool dpy_ui_info_supported(QemuConsole *con)
+bool dpy_ui_info_supported(const QemuConsole *con)
{
if (con == NULL) {
con = active_console;
const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con)
{
+ assert(dpy_ui_info_supported(con));
+
if (con == NULL) {
con = active_console;
}