Do not count client (and crash) if no window.

pull/2755/head
nicm 2021-06-10 07:29:45 +00:00
parent 0c5cbbbf5c
commit b573dbba90
1 changed files with 1 additions and 1 deletions

View File

@ -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. */