vim-patch:8.0.0948: crash if timer closes window while dragging status line

Problem:    Crash if timer closes window while dragging status line.
Solution:   Check if the window still exists. (Yasuhiro Matsumoto, closes
            vim/vim#1979)
989a70c590
This commit is contained in:
Jan Edmund Lazo
2018-08-05 17:22:14 -04:00
parent fe6e4b3244
commit e7e2115de5
4 changed files with 25 additions and 3 deletions

View File

@@ -3995,7 +3995,11 @@ static void nv_mousescroll(cmdarg_T *cap)
col = mouse_col;
/* find the window at the pointer coordinates */
curwin = mouse_find_win(&row, &col);
win_T *const wp = mouse_find_win(&row, &col);
if (wp == NULL) {
return;
}
curwin = wp;
curbuf = curwin->w_buffer;
}