From: Marc-André Lureau Date: Thu, 6 Apr 2017 12:05:12 +0000 (+0200) Subject: console: add same displaychangelistener registration pre-condition X-Git-Tag: v2.10.0-rc0~234^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0665c3b5f57e0c1d20ec555c925fb84ccc31b29;p=thirdparty%2Fqemu.git console: add same displaychangelistener registration pre-condition Catch an invalid state. Mainly useful for documentation purposes. Signed-off-by: Marc-André Lureau Message-id: 20170406120513.638-3-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- diff --git a/ui/console.c b/ui/console.c index 0cbe5033dd6..189eecfd294 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);