]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.361 v7.3.361
authorBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2011 14:40:56 +0000 (15:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2011 14:40:56 +0000 (15:40 +0100)
Problem:    Accessing memory after it is freed when EXITFREE is defined.
Solution:   Don't access curwin when firstwin is NULL. (Dominique Pelle)

src/buffer.c
src/version.c

index d4a9c1eeb16a36a2219dea635d10851089188460..5b2ec6871fd5832555bd0bbed55814a4e2209457 100644 (file)
@@ -567,8 +567,9 @@ buf_freeall(buf, flags)
     diff_buf_delete(buf);          /* Can't use 'diff' for unloaded buffer. */
 #endif
 #ifdef FEAT_SYN_HL
-    if (curwin->w_buffer == buf)
-       reset_synblock(curwin);     /* remove any ownsyntax */
+    /* Remove any ownsyntax, unless exiting. */
+    if (firstwin != NULL && curwin->w_buffer == buf)
+       reset_synblock(curwin);
 #endif
 
 #ifdef FEAT_FOLDING
index 1eadaec242f993f26f2681e63f0a22c43f538a0f..35b519885a07df29d5caaaefb02bab09efcd3c3d 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    361,
 /**/
     360,
 /**/