Skip to content

Commit

Permalink
console: add same displaychangelistener registration pre-condition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
elmarco authored and kraxel committed Apr 24, 2017
1 parent 6905b93 commit e0665c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/console.c
Expand Up @@ -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);
Expand Down

0 comments on commit e0665c3

Please sign in to comment.