changeset 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 bed71c37618c
children cb78c426b74c
files src/version.c src/window.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    317,
+/**/
     316,
 /**/
     315,
--- 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;
+    }
 }
 
 /*