diff src/window.c @ 5952:8ffcb546d782 v7.4.317

updated for version 7.4.317 Problem: Crash when starting gvim. Issue 230. Solution: Check for a pointer to be NULL. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Thu, 12 Jun 2014 11:49:46 +0200
parents 88a6e9f33822
children f7bc601823e5
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -4721,8 +4721,12 @@ win_alloc_lines(wp)
 win_free_lsize(wp)
     win_T	*wp;
 {
-    vim_free(wp->w_lines);
-    wp->w_lines = NULL;
+    /* TODO: why would wp be NULL here? */
+    if (wp != NULL)
+    {
+	vim_free(wp->w_lines);
+	wp->w_lines = NULL;
+    }
 }
 
 /*