diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-03-26 16:28:06 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-26 16:28:06 +0000 |
commit | 347538fad0c503249ebdedd5884c2081257c9f61 (patch) | |
tree | 33916eb0edab0b25845d8ad59a3cd551c62deccd /src/buffer.c | |
parent | bf269ed0b0bd8414eea7bea17465b2738a9a2b55 (diff) |
patch 8.2.4631: crash when switching window in BufWipeout autocommandv8.2.4631
Problem: Crash when switching window in BufWipeout autocommand.
Solution: Put any buffer in the window to avoid it being NULL.
(closes #10024)
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 2dac4874c5..93da5dcc32 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -708,6 +708,10 @@ aucmd_abort: */ if (wipe_buf) { + // Do not wipe out the buffer if it is used in a window. + if (buf->b_nwindows > 0) + return FALSE; + if (action == DOBUF_WIPE_REUSE) { // we can re-use this buffer number, store it |