diff options
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index ce79158050..2776e45f5d 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -763,8 +763,8 @@ void ex_diffupdate(exarg_T *eap) // Make a difference between the first buffer and every other. for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) { buf_T *buf = curtab->tp_diffbuf[idx_new]; - if (buf == NULL) { - continue; + if (buf == NULL || buf->b_ml.ml_mfp == NULL) { + continue; // skip buffer that isn't loaded } if (diff_write(buf, tmp_new) == FAIL) { |