diff options
author | 2013-10-10 11:46:00 +0000 | |
---|---|---|
committer | 2013-10-10 11:46:00 +0000 | |
commit | 89952ace2f264b91dbeceb6b6e4e98a018fc331e (patch) | |
tree | 1172b12788cd091ba01b0b1b3315fd23ebb49175 | |
parent | Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can (diff) | |
download | wireguard-openbsd-89952ace2f264b91dbeceb6b6e4e98a018fc331e.tar.xz wireguard-openbsd-89952ace2f264b91dbeceb6b6e4e98a018fc331e.zip |
Make recalculate_sizes() handle an empty window with no active
pane. This can happen when a window is in two sessions - it isn't
destroyed immediately when the pane goes away but is left until the last
session is destroyed. Fixes problems with grouped sessions reported by
Daniel Ralston.
-rw-r--r-- | usr.bin/tmux/resize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/resize.c b/usr.bin/tmux/resize.c index 1f56a3a0972..4e56301ec08 100644 --- a/usr.bin/tmux/resize.c +++ b/usr.bin/tmux/resize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resize.c,v 1.10 2013/03/24 09:57:59 nicm Exp $ */ +/* $OpenBSD: resize.c,v 1.11 2013/10/10 11:46:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -92,7 +92,7 @@ recalculate_sizes(void) for (i = 0; i < ARRAY_LENGTH(&windows); i++) { w = ARRAY_ITEM(&windows, i); - if (w == NULL) + if (w == NULL || w->active == NULL) continue; flag = options_get_number(&w->options, "aggressive-resize"); |