qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] console: fix dpy_gfx_replace_surface assert
@ 2017-09-06 14:21 Gerd Hoffmann
  2017-09-06 14:50 ` Marc-André Lureau
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2017-09-06 14:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

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>
---
 ui/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-06 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06 14:21 [Qemu-devel] [PATCH] console: fix dpy_gfx_replace_surface assert Gerd Hoffmann
2017-09-06 14:50 ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).