summaryrefslogtreecommitdiffstats
path: root/resize.c
diff options
context:
space:
mode:
authornicm <nicm>2021-12-06 10:08:42 +0000
committernicm <nicm>2021-12-06 10:08:42 +0000
commit8fccbbb02673bed71676412f1a313093a39c48ff (patch)
tree301b6d6cfbc4125b29d02d7f8da2bac7c7b1ce3d /resize.c
parent333cf6429ae16da6fb3892978ea450bc62c3e873 (diff)
Do not dereference NULL window when resizing client, GitHub issue 2982.
Diffstat (limited to 'resize.c')
-rw-r--r--resize.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/resize.c b/resize.c
index 8416ad6a..175dd740 100644
--- a/resize.c
+++ b/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.
* Otherwise skip any session that doesn't contain the window.
*/
+ if (loop->session->curw == NULL)
+ return (1);
if (current)
return (loop->session->curw->window != w);
return (session_has(loop->session, w) == 0);