0
0
mirror of https://github.com/vim/vim.git synced 2025-10-08 06:04:08 -04:00

updated for version 7.4.251

Problem:    Crash when BufAdd autocommand wipes out the buffer.
Solution:   Check for buffer to still be valid. Postpone freeing the buffer
            structure. (Hirohito Higashi)
This commit is contained in:
Bram Moolenaar
2014-04-06 20:45:43 +02:00
parent 75b8156a44
commit 4c7ab1bb57
5 changed files with 39 additions and 2 deletions

View File

@@ -9548,13 +9548,19 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
/*
* When stopping to execute autocommands, restore the search patterns and
* the redo buffer.
* the redo buffer. Free buffers in the au_pending_free_buf list.
*/
if (!autocmd_busy)
{
restore_search_patterns();
restoreRedobuff();
did_filetype = FALSE;
while (au_pending_free_buf != NULL)
{
buf_T *b = au_pending_free_buf->b_next;
vim_free(au_pending_free_buf);
au_pending_free_buf = b;
}
}
/*