mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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 #6827)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user