summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-02-06 19:19:42 +0100
committerBram Moolenaar <Bram@vim.org>2021-02-06 19:19:42 +0100
commit2c7080bf1ceef4a7779644fd428b2386a0676794 (patch)
treecf62c06da02ed3c688e3e8258191f5f61df1b8d8 /src/quickfix.c
parent8c6951fa2836a1ae3257770e7b927a9380439912 (diff)
downloadvim-git-2c7080bf1ceef4a7779644fd428b2386a0676794.tar.gz
patch 8.2.2474: using freed memory when window is closed by autocommandv8.2.2474
Problem: Using freed memory when window is closed by autocommand. (houyunsong) Solution: Check the window pointer is still valid.
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 742a1ee71..910c806f1 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2603,6 +2603,8 @@ qflist_valid(win_T *wp, int_u qf_id)
if (wp != NULL)
{
+ if (!win_valid(wp))
+ return FALSE;
qi = GET_LOC_LIST(wp); // Location list
if (qi == NULL)
return FALSE;