From ffe6655cba7dfc4cc559190151a45b8e497502dc Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 10 Apr 2024 07:15:21 +0000 Subject: [PATCH] Do not get muddled and crash if focusing a pane that is exiting, reported by Saul Nogueras in GitHub issue 3776. --- usr.bin/tmux/window.c | 4 ++-- 1 file 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 @@ -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 { -- 2.20.1