From 5e38516a462cf346e3379f68f4581afa22a9314c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 10 Feb 2020 19:55:59 -0500 Subject: 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 --- src/nvim/quickfix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/quickfix.c') 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 { -- cgit