summaryrefslogtreecommitdiffstats
path: root/src/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 4db302714a..977d83802b 100644
--- 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 == '+')