0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.3.390

Problem:    Using NULL buffer pointer in a window.
Solution:   Check for w_buffer being NULL in more places. (Bjorn Winckler)
This commit is contained in:
Bram Moolenaar
2011-12-30 15:01:59 +01:00
parent 5d6f75e17e
commit fc57380c3f
4 changed files with 18 additions and 7 deletions

View File

@@ -3390,6 +3390,13 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
(flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD);
#ifdef FEAT_AUTOCMD
/* Autocommands may open a new window and leave oldwin open
* which leads to crashes since the above call sets
* oldwin->w_buffer to NULL. */
if (curwin != oldwin && oldwin != aucmd_win
&& win_valid(oldwin) && oldwin->w_buffer == NULL)
win_close(oldwin, FALSE);
# ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
{