updated for version 7.3.390
Problem:    Using NULL buffer pointer in a window.
Solution:   Check for w_buffer being NULL in more places. (Bjorn Winckler)
diff --git a/src/window.c b/src/window.c
index 6b803f5..80c69a1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2170,7 +2170,7 @@
 
     /* When closing the help window, try restoring a snapshot after closing
      * the window.  Otherwise clear the snapshot, it's now invalid. */
-    if (win->w_buffer->b_help)
+    if (win->w_buffer != NULL && win->w_buffer->b_help)
 	help_window = TRUE;
     else
 	clear_snapshot(curtab, SNAP_HELP_IDX);
@@ -2214,13 +2214,15 @@
 
 #ifdef FEAT_SYN_HL
     /* Free independent synblock before the buffer is freed. */
-    reset_synblock(win);
+    if (win->w_buffer != NULL)
+	reset_synblock(win);
 #endif
 
     /*
      * Close the link to the buffer.
      */
-    close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0);
+    if (win->w_buffer != NULL)
+	close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0);
 
     /* Autocommands may have closed the window already, or closed the only
      * other window or moved to another tab page. */