aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 af055e9b75..1241841885 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -984,7 +984,7 @@ qf_init_ext(
}
// Use the local value of 'errorformat' if it's set.
- if (errorformat == p_efm && tv == NULL && *buf->b_p_efm != NUL) {
+ if (errorformat == p_efm && tv == NULL && buf && *buf->b_p_efm != NUL) {
efm = buf->b_p_efm;
} else {
efm = errorformat;