mirror of
https://github.com/tmux/tmux.git
synced 2024-11-17 18:08:51 +00:00
Do not dereference NULL window when resizing client, GitHub issue 2982.
This commit is contained in:
parent
333cf6429a
commit
8fccbbb026
2
resize.c
2
resize.c
@ -348,6 +348,8 @@ recalculate_size_skip_client(struct client *loop, __unused int type,
|
|||||||
* is not the current window - this is used for aggressive-resize.
|
* is not the current window - this is used for aggressive-resize.
|
||||||
* Otherwise skip any session that doesn't contain the window.
|
* Otherwise skip any session that doesn't contain the window.
|
||||||
*/
|
*/
|
||||||
|
if (loop->session->curw == NULL)
|
||||||
|
return (1);
|
||||||
if (current)
|
if (current)
|
||||||
return (loop->session->curw->window != w);
|
return (loop->session->curw->window != w);
|
||||||
return (session_has(loop->session, w) == 0);
|
return (session_has(loop->session, w) == 0);
|
||||||
|
4
tty.c
4
tty.c
@ -937,7 +937,9 @@ tty_update_window_offset(struct window *w)
|
|||||||
struct client *c;
|
struct client *c;
|
||||||
|
|
||||||
TAILQ_FOREACH(c, &clients, entry) {
|
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);
|
tty_update_client_offset(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user