diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-12 10:13:01 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-12 11:14:09 +0400 |
commit | a92e7bb4cad57cc5c8817fb18fb25650507b69f8 (patch) | |
tree | fe679976e6c086661aa2142917a03085699d73b9 /include/ui | |
parent | 48a35e12faf90a896c5aa4755812201e00d60316 (diff) |
ui: add precondition for dpy_get_ui_info()
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>
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/console.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ui/console.h b/include/ui/console.h index 79e4702912..28882f15a5 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -329,7 +329,7 @@ void update_displaychangelistener(DisplayChangeListener *dcl, 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); |