qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 3/4] console: fix dpy_gfx_replace_surface assert
Date: Wed, 13 Sep 2017 10:40:50 +0200	[thread overview]
Message-ID: <20170913084051.21378-4-kraxel@redhat.com> (raw)
In-Reply-To: <20170913084051.21378-1-kraxel@redhat.com>

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
---
 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

  parent reply	other threads:[~2017-09-13  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13  8:40 [Qemu-devel] [PULL 0/4] Ui 20170913 patches Gerd Hoffmann
2017-09-13  8:40 ` [Qemu-devel] [PULL 1/4] pixman: drop submodule Gerd Hoffmann
2017-09-13  8:40 ` [Qemu-devel] [PULL 2/4] pixman: drop configure switches Gerd Hoffmann
2017-09-13  8:40 ` Gerd Hoffmann [this message]
2017-09-13  8:40 ` [Qemu-devel] [PULL 4/4] console: add question-mark escape operator Gerd Hoffmann
2017-09-14 14:47 ` [Qemu-devel] [PULL 0/4] Ui 20170913 patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170913084051.21378-4-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).