]> git.proxmox.com Git - mirror_qemu.git/commitdiff
console: add same displaychangelistener registration pre-condition
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Apr 2017 12:05:12 +0000 (14:05 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 24 Apr 2017 08:12:28 +0000 (10:12 +0200)
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>
ui/console.c

index 0cbe5033dd636b480c7239e85377f3f94880730e..189eecfd294045b0db1713ce81db4bd91dd2710c 100644 (file)
@@ -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);