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:
@@ -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 */
|
||||
{
|
||||
|
Reference in New Issue
Block a user