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