=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/control.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- src/usr.bin/tmux/control.c 2020/09/18 11:20:59 1.45 +++ src/usr.bin/tmux/control.c 2021/08/17 20:17:21 1.46 @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.45 2020/09/18 11:20:59 nicm Exp $ */ +/* $OpenBSD: control.c,v 1.46 2021/08/17 20:17:21 nicm Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott @@ -665,7 +665,7 @@ uint64_t age, t = get_timer(); wp = control_window_pane(c, cp->pane); - if (wp == NULL) { + if (wp == NULL || wp->fd == -1) { TAILQ_FOREACH_SAFE(cb, &cp->blocks, entry, cb1) { TAILQ_REMOVE(&cp->blocks, cb, entry); control_free_block(cs, cb); @@ -865,7 +865,7 @@ struct control_sub_pane *csp, find; wp = window_pane_find_by_id(csub->id); - if (wp == NULL) + if (wp == NULL || wp->fd == -1) return; w = wp->window;