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

@@ -9493,6 +9493,9 @@ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
/* Find the window at the mouse coordinates and compute the
* text position. */
win = mouse_find_win(&row, &col);
if (win == NULL) {
return;
}
(void)mouse_comp_pos(win, &row, &col, &lnum);
for (wp = firstwin; wp != win; wp = wp->w_next)
++winnr;