Mercurial > vim
changeset 3182:e42252611e74 v7.3.361
updated for version 7.3.361
Problem: Accessing memory after it is freed when EXITFREE is defined.
Solution: Don't access curwin when firstwin is NULL. (Dominique Pelle)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 30 Nov 2011 15:40:56 +0100 |
parents | 33de718326f4 |
children | cccf3bc67bb3 |
files | src/buffer.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -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