summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2021-06-10 07:29:45 +0000
committernicm <nicm>2021-06-10 07:29:45 +0000
commitb573dbba9062fa9db3b60310cdb4d8776a0be3fd (patch)
treec334b85d51572c352dfb160f61753767813efa83
parent0c5cbbbf5cd09598ff2f3d6d1ae99fa353ec5b40 (diff)
Do not count client (and crash) if no window.
-rw-r--r--resize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/resize.c b/resize.c
index 66cb9430..38cda23d 100644
--- a/resize.c
+++ b/resize.c
@@ -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. */