updated for version 7.2-215
diff --git a/src/fileio.c b/src/fileio.c
index 9ce41d4..61c2148 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -710,7 +710,8 @@
 #endif
 #ifdef UNIX
 	/* Set swap file protection bits after creating it. */
-	if (swap_mode > 0 && curbuf->b_ml.ml_mfp->mf_fname != NULL)
+	if (swap_mode > 0 && curbuf->b_ml.ml_mfp != NULL
+			  && curbuf->b_ml.ml_mfp->mf_fname != NULL)
 	    (void)mch_setperm(curbuf->b_ml.ml_mfp->mf_fname, (long)swap_mode);
 #endif
     }
@@ -8435,9 +8436,9 @@
 	 * effects, insert it in a the current tab page.
 	 * Anything related to a window (e.g., setting folds) may have
 	 * unexpected results. */
-	curwin = aucmd_win;
-	curwin->w_buffer = buf;
+	aucmd_win->w_buffer = buf;
 	++buf->b_nwindows;
+	win_init_empty(aucmd_win); /* set cursor and topline to safe values */
 
 #ifdef FEAT_WINDOWS
 	/* Split the current window, put the aucmd_win in the upper half. */
@@ -8448,12 +8449,7 @@
 	(void)win_comp_pos();   /* recompute window positions */
 	p_ea = save_ea;
 #endif
-	/* set cursor and topline to safe values */
-	curwin_init();
-#ifdef FEAT_VERTSPLIT
-	curwin->w_wincol = 0;
-	curwin->w_width = Columns;
-#endif
+	curwin = aucmd_win;
     }
     curbuf = buf;
     aco->new_curwin = curwin;