mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
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
This commit is contained in:
@@ -3679,7 +3679,12 @@ win_free (
|
||||
|
||||
if (wp != aucmd_win)
|
||||
win_remove(wp, tp);
|
||||
free(wp);
|
||||
if (autocmd_busy) {
|
||||
wp->w_next = au_pending_free_win;
|
||||
au_pending_free_win = wp;
|
||||
} else {
|
||||
free(wp);
|
||||
}
|
||||
|
||||
unblock_autocmds();
|
||||
}
|
||||
|
Reference in New Issue
Block a user