From 0632da4d9e2ec1e445840299f1e0fbda7a61bef4 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 12 Jan 2018 13:47:48 +0100 Subject: [PATCH 07/12] ui: fix dcl unregister MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Gerd Hoffmann Message-id: <20180112134748.13701-2-kraxel@redhat.com> Patchwork-id: 78568 O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 1/1] ui: fix dcl unregister Bugzilla: 1510809 RH-Acked-by: John Snow RH-Acked-by: Jeffrey Cody RH-Acked-by: Laszlo Ersek 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 (cherry picked from commit 777c5f1e436d334a57b650b6951c13d8d2799df0) Signed-off-by: Miroslav Rezanina --- ui/console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/console.c b/ui/console.c index 2616f9c..6967fd4 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1489,6 +1489,7 @@ void unregister_displaychangelistener(DisplayChangeListener *dcl) dcl->con->dcls--; } QLIST_REMOVE(dcl, next); + dcl->ds = NULL; gui_setup_refresh(ds); } -- 1.8.3.1