Mercurial > vim
comparison src/quickfix.c @ 23865:e1643a1aa1a0 v8.2.2474
patch 8.2.2474: using freed memory when window is closed by autocommand
Commit: https://github.com/vim/vim/commit/2c7080bf1ceef4a7779644fd428b2386a0676794
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 6 19:19:42 2021 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 Feb 2021 19:30:04 +0100 |
parents | 8b682f6f3709 |
children | 192058cad081 |
comparison
equal
deleted
inserted
replaced
23864:de93a3b7f996 | 23865:e1643a1aa1a0 |
---|---|
2601 qf_info_T *qi = &ql_info; | 2601 qf_info_T *qi = &ql_info; |
2602 int i; | 2602 int i; |
2603 | 2603 |
2604 if (wp != NULL) | 2604 if (wp != NULL) |
2605 { | 2605 { |
2606 if (!win_valid(wp)) | |
2607 return FALSE; | |
2606 qi = GET_LOC_LIST(wp); // Location list | 2608 qi = GET_LOC_LIST(wp); // Location list |
2607 if (qi == NULL) | 2609 if (qi == NULL) |
2608 return FALSE; | 2610 return FALSE; |
2609 } | 2611 } |
2610 | 2612 |