diff options
| author | Gerd Hoffmann <kraxel@redhat.com> | 2017-09-06 16:21:09 +0200 |
|---|---|---|
| committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-09-13 10:16:18 +0200 |
| commit | 1540008629bbb6a9c0826582d94ecf7a559f784c (patch) | |
| tree | 67b8cee760877af2e303526743d784b0f3e7086b | |
| parent | 35c4e86cf3c57fc395891c2bb7573c435ae58ec8 (diff) | |
| download | focaccia-qemu-1540008629bbb6a9c0826582d94ecf7a559f784c.tar.gz focaccia-qemu-1540008629bbb6a9c0826582d94ecf7a559f784c.zip | |
console: fix dpy_gfx_replace_surface assert
virtio-gpu can trigger the assert added by commit "6905b93447 console: add same surface replace pre-condition" in multihead setups (where surface can be NULL for secondary displays). Allow surface being NULL. Fixes: 6905b93447a42e606dfd126b90f75f4cd3c6fe94 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20170906142109.2685-1-kraxel@redhat.com
| -rw-r--r-- | ui/console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/console.c b/ui/console.c index d2d3534c49..f0292d7820 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1540,7 +1540,7 @@ void dpy_gfx_replace_surface(QemuConsole *con, DisplaySurface *old_surface = con->surface; DisplayChangeListener *dcl; - assert(old_surface != surface); + assert(old_surface != surface || surface == NULL); con->surface = surface; QLIST_FOREACH(dcl, &s->listeners, next) { |