提交 15400086 编写于 作者: G Gerd Hoffmann

console: fix dpy_gfx_replace_surface assert

virtio-gpu can trigger the assert added by commit "6905b934 console:
add same surface replace pre-condition" in multihead setups (where
surface can be NULL for secondary displays).  Allow surface being NULL.

Fixes: 6905b934Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20170906142109.2685-1-kraxel@redhat.com
上级 35c4e86c
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册