diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-16 22:46:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-16 22:46:01 +0200 |
commit | 989a70c590c2bd109eb362d3a0e48cb1427ae13d (patch) | |
tree | e35f05c19c3589b00450a54c40d3d928b32b0500 /src/evalfunc.c | |
parent | 6fe15bbc87cb996912fe3c2c4068e356071ac516 (diff) | |
download | vim-989a70c590c2bd109eb362d3a0e48cb1427ae13d.zip |
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)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 2be7fe1bf..452183594 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -4382,6 +4382,8 @@ f_getchar(typval_T *argvars, typval_T *rettv) /* 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); # ifdef FEAT_WINDOWS for (wp = firstwin; wp != win; wp = wp->w_next) |