summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-08-17 20:17:22 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-08-17 20:17:22 +0000
commit4c0e1d22e6e2e6e4da36a95f22633af392e43528 (patch)
treeddf7907fbf8169a8ead1478c41a2c38e21feb1cf /usr.bin
parent234f6d2ebc197dcf17073b6301ae56f92f52ff15 (diff)
Treat a pane that has died the same as no pane when sending data to
control mode clients, GitHub issue 2828.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/control.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/control.c b/usr.bin/tmux/control.c
index ee6d34c60a9..6e05f444e32 100644
--- a/usr.bin/tmux/control.c
+++ b/usr.bin/tmux/control.c
@@ -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 <nicholas.marriott@gmail.com>
@@ -665,7 +665,7 @@ control_write_pending(struct client *c, struct control_pane *cp, size_t limit)
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 @@ control_check_subs_pane(struct client *c, struct control_sub *csub)
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;