0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 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)
This commit is contained in:
Bram Moolenaar
2014-06-12 14:01:31 +02:00
parent 980e58f7b3
commit 3be8585661
5 changed files with 27 additions and 6 deletions

View File

@@ -4597,7 +4597,13 @@ win_free(wp, tp)
if (wp != aucmd_win)
#endif
win_remove(wp, tp);
vim_free(wp);
if (autocmd_busy)
{
wp->w_next = au_pending_free_win;
au_pending_free_win = wp;
}
else
vim_free(wp);
#ifdef FEAT_AUTOCMD
unblock_autocmds();