summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-31 22:16:08 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-31 22:16:08 +0200
commit997cd1a17f030d004b334d17cf1c1c57050c9906 (patch)
treeca8ec548662f733807f6d2a293647ab92b668f1d /src/quickfix.c
parent39f7aa3c3124065b50f182b1d2f7ac92a0918656 (diff)
downloadvim-git-997cd1a17f030d004b334d17cf1c1c57050c9906.tar.gz
patch 8.2.1557: crash in :vimgrep when started as "vim -n"v8.2.1557
Problem: Crash in :vimgrep when started as "vim -n". (Raul Segura) Solution: Check mfp pointer. (Yegappan Lakshmanan, closes #6827)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 99b0169ea..f8ff7765e 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -6022,7 +6022,7 @@ vgr_process_args(
static int
existing_swapfile(buf_T *buf)
{
- if (buf->b_ml.ml_mfp != NULL)
+ if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL)
{
char_u *fname = buf->b_ml.ml_mfp->mf_fname;
size_t len = STRLEN(fname);