1
0
forked from aniani/vim

updated for version 7.2.382

Problem:    Accessing freed memory when closing the cmdline window when
            'bufhide' is set to "wipe".
Solution:   Check if the buffer still exists before invoking close_buffer()
            (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2010-03-02 17:23:21 +01:00
parent 5e3dae8b6b
commit 8006d69d3c
2 changed files with 7 additions and 1 deletions

View File

@@ -6252,7 +6252,11 @@ ex_window()
bp = curbuf;
win_goto(old_curwin);
win_close(wp, TRUE);
close_buffer(NULL, bp, DOBUF_WIPE);
/* win_close() may have already wiped the buffer when 'bh' is
* set to 'wipe' */
if (buf_valid(bp))
close_buffer(NULL, bp, DOBUF_WIPE);
/* Restore window sizes. */
win_size_restore(&winsizes);