Merge remote-tracking branch 'remotes/kraxel/tags/ui-20171110-pull-request' into staging
ui: fixes for 2.11
# gpg: Signature made Fri 10 Nov 2017 14:02:23 GMT
# gpg: using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/ui-20171110-pull-request:
ui: use QEMU_IS_ALIGNED macro
ui: fix dcl unregister
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
diff --git a/ui/console-gl.c b/ui/console-gl.c
index 5b77e7a..a56e1cd 100644
--- a/ui/console-gl.c
+++ b/ui/console-gl.c
@@ -48,7 +48,7 @@
DisplaySurface *surface)
{
assert(gls);
- assert(surface_stride(surface) % surface_bytes_per_pixel(surface) == 0);
+ assert(QEMU_IS_ALIGNED(surface_stride(surface), surface_bytes_per_pixel(surface)));
switch (surface->format) {
case PIXMAN_BE_b8g8r8x8:
diff --git a/ui/console.c b/ui/console.c
index eca854c..c4c95ab 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1471,6 +1471,7 @@
dcl->con->dcls--;
}
QLIST_REMOVE(dcl, next);
+ dcl->ds = NULL;
gui_setup_refresh(ds);
}