Do not dereference NULL window when resizing client, GitHub issue 2982.

This commit is contained in:
nicm
2021-12-06 10:08:42 +00:00
parent 333cf6429a
commit 8fccbbb026
2 changed files with 5 additions and 1 deletions

4
tty.c
View File

@ -937,7 +937,9 @@ tty_update_window_offset(struct window *w)
struct client *c;
TAILQ_FOREACH(c, &clients, entry) {
if (c->session != NULL && c->session->curw->window == w)
if (c->session != NULL &&
c->session->curw != NULL &&
c->session->curw->window == w)
tty_update_client_offset(c);
}
}