Skip to contentSkip to conversation

ui: fix dcl unregister

PATCH New Gerd Hoffmann 1 participant 1 message Nov 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
 ui/console.c | 1 +
 1 file changed, 1 insertion(+)
ui/console.c +1 -0
index eca854cbd5..c4c95abed7 100644
@@ -1471,6 +1471,7 @@ void unregister_displaychangelistener(DisplayChangeListener *dcl)
         dcl->con->dcls--;
     }
     QLIST_REMOVE(dcl, next);
+    dcl->ds = NULL;
     gui_setup_refresh(ds);
 }
 
Signature · 1 line
2.9.3