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>
This commit is contained in:
parent
6905b93447
commit
e0665c3b5f
@ -1410,6 +1410,8 @@ void register_displaychangelistener(DisplayChangeListener *dcl)
|
|||||||
static DisplaySurface *dummy;
|
static DisplaySurface *dummy;
|
||||||
QemuConsole *con;
|
QemuConsole *con;
|
||||||
|
|
||||||
|
assert(!dcl->ds);
|
||||||
|
|
||||||
if (dcl->ops->dpy_gl_ctx_create) {
|
if (dcl->ops->dpy_gl_ctx_create) {
|
||||||
/* display has opengl support */
|
/* display has opengl support */
|
||||||
assert(dcl->con);
|
assert(dcl->con);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user