diff src/fileio.c @ 2028:be1d64f82db2 v7.2.325

updated for version 7.2-325
author vimboss
date Thu, 31 Dec 2009 13:53:33 +0000
parents 79b395ba0ea5
children 85da03763130
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2981,6 +2981,13 @@ buf_write(buf, fname, sfname, start, end
 
     if (fname == NULL || *fname == NUL)	/* safety check */
 	return FAIL;
+    if (buf->b_ml.ml_mfp == NULL)
+    {
+	/* This can happen during startup when there is a stray "w" in the
+	 * vimrc file. */
+	EMSG(_(e_emptybuf));
+	return FAIL;
+    }
 
     /*
      * Disallow writing from .exrc and .vimrc in current directory for