From aa6adacd77e59b2cf2ca7bdeae9a24c062b2a9c0 Mon Sep 17 00:00:00 2001 From: Tony Chen <36219739+chentau@users.noreply.github.com> Date: Mon, 29 Mar 2021 05:19:59 -0700 Subject: Make sure window is still valid in the middle of calling :lopen (#14240) Make sure that oldwin is not invalid after splitting Revisit this when porting vim patch v8.1.0892 and related quickfix patches. --- src/nvim/window.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/window.c') diff --git a/src/nvim/window.c b/src/nvim/window.c index fd7af108b7..859f4353b3 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1301,6 +1301,10 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir) p_wh = i; } + if (!win_valid(oldwin)) { + return FAIL; + } + // Send the window positions to the UI oldwin->w_pos_changed = true; -- cgit