updated for version 7.2-202
diff --git a/src/fileio.c b/src/fileio.c
index d190863..ad7670d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4824,6 +4824,8 @@
     char_u	*sfname;
 {
 #ifdef FEAT_AUTOCMD
+    buf_T	*buf = curbuf;
+
     /* It's like the unnamed buffer is deleted.... */
     if (curbuf->b_p_bl)
 	apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
@@ -4832,6 +4834,12 @@
     if (aborting())	    /* autocmds may abort script processing */
 	return FAIL;
 # endif
+    if (curbuf != buf)
+    {
+	/* We are in another buffer now, don't do the renaming. */
+	EMSG(_(e_auchangedbuf));
+	return FAIL;
+    }
 #endif
 
     if (setfname(curbuf, fname, sfname, FALSE) == OK)
diff --git a/src/version.c b/src/version.c
index 72208d1..496212e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    202,
+/**/
     201,
 /**/
     200,