Mercurial > vim
diff src/evalfunc.c @ 12136:60cf03e59402 v8.0.0948
patch 8.0.0948: crash if timer closes window while dragging status line
commit https://github.com/vim/vim/commit/989a70c590c2bd109eb362d3a0e48cb1427ae13d
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 16 22:46:01 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 16 Aug 2017 23:00:05 +0200 |
parents | 6afc7339c2ad |
children | abd69cea3459 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -4382,6 +4382,8 @@ f_getchar(typval_T *argvars, typval_T *r /* 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)