commit | 2c7080bf1ceef4a7779644fd428b2386a0676794 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sat Feb 06 19:19:42 2021 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Sat Feb 06 19:19:42 2021 +0100 |
tree | cf62c06da02ed3c688e3e8258191f5f61df1b8d8 | |
parent | 8c6951fa2836a1ae3257770e7b927a9380439912 [diff] [blame] |
patch 8.2.2474: using freed memory when window is closed by autocommand Problem: Using freed memory when window is closed by autocommand. (houyunsong) Solution: Check the window pointer is still valid.
diff --git a/src/quickfix.c b/src/quickfix.c index 742a1ee..910c806 100644 --- a/src/quickfix.c +++ b/src/quickfix.c
@@ -2603,6 +2603,8 @@ if (wp != NULL) { + if (!win_valid(wp)) + return FALSE; qi = GET_LOC_LIST(wp); // Location list if (qi == NULL) return FALSE;