changeset 3089:33c140e4664d v7.3.316

updated for version 7.3.316 Problem: Crash when 'colorcolumn' is set and closing buffer. Solution: Check for w_buffer to be NULL. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Wed, 21 Sep 2011 13:40:17 +0200
parents 15b934a16641
children 6838fcfbd037
files src/option.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -7036,6 +7036,9 @@ check_colorcolumn(wp)
     int		i;
     int		j = 0;
 
+    if (wp->w_buffer == NULL)
+	return NULL;  /* buffer was closed */
+
     for (s = wp->w_p_cc; *s != NUL && count < 255;)
     {
 	if (*s == '-' || *s == '+')
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    316,
+/**/
     315,
 /**/
     314,