mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
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:6905b93447
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
This commit is contained in:
parent
35c4e86cf3
commit
1540008629
1 changed files with 1 additions and 1 deletions
|
@ -1540,7 +1540,7 @@ void dpy_gfx_replace_surface(QemuConsole *con,
|
||||||
DisplaySurface *old_surface = con->surface;
|
DisplaySurface *old_surface = con->surface;
|
||||||
DisplayChangeListener *dcl;
|
DisplayChangeListener *dcl;
|
||||||
|
|
||||||
assert(old_surface != surface);
|
assert(old_surface != surface || surface == NULL);
|
||||||
|
|
||||||
con->surface = surface;
|
con->surface = surface;
|
||||||
QLIST_FOREACH(dcl, &s->listeners, next) {
|
QLIST_FOREACH(dcl, &s->listeners, next) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue