diff options
author | André Twupack <atwupack@mailbox.org> | 2014-09-21 00:29:45 +0200 |
---|---|---|
committer | André Twupack <atwupack@mailbox.org> | 2014-09-21 10:42:27 +0200 |
commit | 2b937fe00d8b0b308cce87aee9f70699f8474c1e (patch) | |
tree | 7b3c7cf3597222905f907fe99233120df79ef504 /src/nvim/buffer.c | |
parent | 0ed9f3ec8338783466b0a6ab2661d9a061a436fa (diff) | |
download | rneovim-2b937fe00d8b0b308cce87aee9f70699f8474c1e.tar.gz rneovim-2b937fe00d8b0b308cce87aee9f70699f8474c1e.tar.bz2 rneovim-2b937fe00d8b0b308cce87aee9f70699f8474c1e.zip |
vim-patch:7.4.320
Problem: Possible crash when an BufLeave autocommand deletes the buffer.
Solution: Check for the window pointer being valid. Postpone freeing the
window until autocommands are done. (Yasuhiro Matsumoto)
https://code.google.com/p/vim/source/detail?r=v7-4-320
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 11171617ef..31fa54295a 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -318,7 +318,7 @@ close_buffer ( } else if (buf->b_p_bh[0] == 'u') /* 'bufhidden' == "unload" */ unload_buf = true; - if (win != NULL) { + if (win_valid(win)) { /* Set b_last_cursor when closing the last window for the buffer. * Remember the last cursor position and window options of the buffer. * This used to be only for the current window, but then options like |