From cad9aae374374069ec6a4025614627208e29f826 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 10 Jun 2021 07:29:45 +0000 Subject: [PATCH] Do not count client (and crash) if no window. --- usr.bin/tmux/resize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/resize.c b/usr.bin/tmux/resize.c index 5941b9865ea..10ce11dcf1b 100644 --- a/usr.bin/tmux/resize.c +++ b/usr.bin/tmux/resize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resize.c,v 1.43 2021/06/10 07:24:45 nicm Exp $ */ +/* $OpenBSD: resize.c,v 1.44 2021/06/10 07:29:45 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -136,7 +136,7 @@ clients_calculate_size(int type, int current, struct client *c, * For latest, count the number of clients with this window. We only * care if there is more than one. */ - if (type == WINDOW_SIZE_LATEST) + if (type == WINDOW_SIZE_LATEST && w != NULL) n = clients_with_window(w); /* Loop over the clients and work out the size. */ -- 2.20.1