Remove a reference from the right window when removing from a winlink's

list.
This commit is contained in:
nicm 2017-04-28 19:12:15 +00:00
parent 92053cb492
commit bcd6b41674

View File

@ -186,7 +186,7 @@ winlink_set_window(struct winlink *wl, struct window *w)
{
if (wl->window != NULL) {
TAILQ_REMOVE(&wl->window->winlinks, wl, wentry);
window_remove_ref(w);
window_remove_ref(wl->window);
}
TAILQ_INSERT_TAIL(&w->winlinks, wl, wentry);
wl->window = w;