From aa492127311692a576d308db3afbd3bba0fead00 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 3 Dec 2022 13:34:25 +0800 Subject: vim-patch:9.0.0322: crash when no errors and 'quickfixtextfunc' is set (#21269) Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any. https://github.com/vim/vim/commit/4f1b083be43f351bc107541e7b0c9655a5d2c0bb Co-authored-by: Bram Moolenaar --- 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 d4dff746c7..6c13aa5d50 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -4076,7 +4076,7 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int q } // Check if there is anything to display - if (qfl != NULL) { + if (qfl != NULL && qfl->qf_start != NULL) { char dirname[MAXPATHL]; *dirname = NUL; -- cgit