mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 17:11:48 +00:00
vim-patch:9.2.0882: :bwipe crashes if WinLeave wipes all other buffers (#41082)
Problem: :bwipe crashes if WinLeave wipes all other buffers
(after 9.1.2068).
Solution: Check for NULL pointer.
related: neovim/neovim#41066
closes: vim/vim#20888
3e4019a082
This commit is contained in:
@@ -1626,7 +1626,7 @@ static int do_buffer_ext(int action, int start, int dir, int count, int flags)
|
||||
}
|
||||
if (buf == NULL) { // Still no buffer, just take one
|
||||
buf = curbuf->b_next != NULL ? curbuf->b_next : curbuf->b_prev;
|
||||
if (bt_quickfix(buf) || (buf != curbuf && buf->b_locked_split)) {
|
||||
if (bt_quickfix(buf) || (buf != NULL && buf != curbuf && buf->b_locked_split)) {
|
||||
buf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user