From: Gerd Hoffmann Date: Thu, 9 Nov 2017 10:51:54 +0000 (+0100) Subject: ui: fix dcl unregister X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=777c5f1e436d334a57b650b6951c13d8d2799df0;p=qemu.git ui: fix dcl unregister register checks for dcl->ds being NULL, to avoid registering the same dcl twice. Therefore dcl->ds must be cleared on unregister, otherwise un-registering and re-registering doesn't work. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1510809 Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20171109105154.29414-1-kraxel@redhat.com --- diff --git a/ui/console.c b/ui/console.c index eca854cbd5..c4c95abed7 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1471,6 +1471,7 @@ void unregister_displaychangelistener(DisplayChangeListener *dcl) dcl->con->dcls--; } QLIST_REMOVE(dcl, next); + dcl->ds = NULL; gui_setup_refresh(ds); }