aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-17 11:05:33 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-17 11:09:35 -0400
commitb9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a (patch)
treea5fc7392ee76a62d00437e010e036a09342b8e9a /src/nvim/quickfix.c
parentafd4888c6ae0430cb9e9b26a4b43734b7f39610f (diff)
downloadrneovim-b9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a.tar.gz
rneovim-b9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a.tar.bz2
rneovim-b9fe30cac2967a4f7bc29d32a3cf1196fa3a1f3a.zip
vim-patch:8.2.1557: crash in :vimgrep when started as "vim -n"
Problem: Crash in :vimgrep when started as "vim -n". (Raul Segura) Solution: Check mfp pointer. (Yegappan Lakshmanan, closes vim/vim#6827) https://github.com/vim/vim/commit/997cd1a17f030d004b334d17cf1c1c57050c9906
Diffstat (limited to 'src/nvim/quickfix.c')
-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 9352d5e8cc..4d3d0f5fdf 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -5073,7 +5073,7 @@ static void vgr_jump_to_match(qf_info_T *qi, int forceit, int *redraw_for_dummy,
static bool existing_swapfile(const buf_T *buf)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
{
- if (buf->b_ml.ml_mfp != NULL) {
+ if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) {
const char_u *const fname = buf->b_ml.ml_mfp->mf_fname;
const size_t len = STRLEN(fname);