aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-02-10 19:55:59 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-02-16 07:49:44 -0500
commit5e38516a462cf346e3379f68f4581afa22a9314c (patch)
treee177f984f1dac1d1d68ff255d4a0af2d104855b3 /src/nvim/quickfix.c
parentbde4f47eb29b757e3282fb08ae6ee844941b1f65 (diff)
downloadrneovim-5e38516a462cf346e3379f68f4581afa22a9314c.tar.gz
rneovim-5e38516a462cf346e3379f68f4581afa22a9314c.tar.bz2
rneovim-5e38516a462cf346e3379f68f4581afa22a9314c.zip
vim-patch:8.2.0241: crash when setting 'buftype' to "quickfix"
Problem: Crash when setting 'buftype' to "quickfix". Solution: Check that error list is not NULL. (closes vim/vim#5613) https://github.com/vim/vim/commit/99234f29aa8767f2e71bb1f5db6ee0131bc8e64e
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 71c6f06ac0..06ffa171ca 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -3845,7 +3845,7 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last)
*dirname = NUL;
// Add one line for each error
- if (old_last == NULL) {
+ if (old_last == NULL || old_last->qf_next == NULL) {
qfp = qfl->qf_start;
lnum = 0;
} else {