diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-04-06 14:05:12 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-24 10:12:28 +0200 |
commit | e0665c3b5f57e0c1d20ec555c925fb84ccc31b29 (patch) | |
tree | 5e02aaac75ff16ca8e0dc16b1d12f46205bb6fbe | |
parent | 6905b93447a42e606dfd126b90f75f4cd3c6fe94 (diff) |
console: add same displaychangelistener registration pre-condition
Catch an invalid state. Mainly useful for documentation purposes.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20170406120513.638-3-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | ui/console.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c index 0cbe5033dd..189eecfd29 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1410,6 +1410,8 @@ void register_displaychangelistener(DisplayChangeListener *dcl) static DisplaySurface *dummy; QemuConsole *con; + assert(!dcl->ds); + if (dcl->ops->dpy_gl_ctx_create) { /* display has opengl support */ assert(dcl->con); |