From 99234f29aa8767f2e71bb1f5db6ee0131bc8e64e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 10 Feb 2020 22:56:54 +0100 Subject: 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 #5613) --- src/quickfix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quickfix.c') diff --git a/src/quickfix.c b/src/quickfix.c index 868b5d910a..00457e256d 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -4520,7 +4520,7 @@ 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; -- cgit v1.2.3