0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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
            #1979)
This commit is contained in:
Bram Moolenaar
2017-08-16 22:46:01 +02:00
parent 6fe15bbc87
commit 989a70c590
6 changed files with 29 additions and 6 deletions

View File

@@ -9418,7 +9418,7 @@ ins_mousescroll(int dir)
{
pos_T tpos;
# if defined(FEAT_WINDOWS)
win_T *old_curwin = curwin;
win_T *old_curwin = curwin, *wp;
# endif
# ifdef FEAT_INS_EXPAND
int did_scroll = FALSE;
@@ -9435,7 +9435,10 @@ ins_mousescroll(int dir)
col = mouse_col;
/* find the window at the pointer coordinates */
curwin = mouse_find_win(&row, &col);
wp = mouse_find_win(&row, &col);
if (wp == NULL)
return;
curwin = wp;
curbuf = curwin->w_buffer;
}
if (curwin == old_curwin)