mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-patch:8.0.0700: segfault with QuitPre autocommand closes the window
Problem: Segfault with QuitPre autocommand closes the window. (Marek)
Solution: Check that the window pointer is still valid. (Christian Brabandt,
closes vim/vim#1817)
0ea5070d79
This commit is contained in:
@@ -5978,6 +5978,7 @@ static void ex_quit(exarg_T *eap)
|
||||
// Refuse to quit when locked or when the buffer in the last window is
|
||||
// being closed (can only happen in autocommands).
|
||||
if (curbuf_locked()
|
||||
|| !win_valid(wp)
|
||||
|| (wp->w_buffer->b_nwindows == 1 && wp->w_buffer->b_locked > 0)) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user