summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-04-10 07:15:22 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-04-10 07:15:22 +0000
commit58eb9d37a482d34af43829c28e51af6161bd4c2c (patch)
treed193807d412b2b7eb12f5d25401f2309d1fd63d4 /usr.bin/tmux/window.c
parentef25830c213ef22ff3214ccad7ed9704ac453880 (diff)
Do not get muddled and crash if focusing a pane that is exiting,
reported by Saul Nogueras in GitHub issue 3776.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r--usr.bin/tmux/window.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 3d4361a4a12..e9a9a1ef202 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.289 2024/03/21 11:30:42 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.290 2024/04/10 07:15:21 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -474,7 +474,7 @@ window_pane_update_focus(struct window_pane *wp)
struct client *c;
int focused = 0;
- if (wp != NULL) {
+ if (wp != NULL && (~wp->flags & PANE_EXITED)) {
if (wp != wp->window->active)
focused = 0;
else {