diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-05 17:22:14 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-05 17:42:49 -0400 |
commit | e7e2115de5c1a4bafdf8b0819f97a0bea8de379b (patch) | |
tree | 08b0639f219df7051487bed7c8fcc35c20d1d6dc /src/nvim/eval.c | |
parent | fe6e4b3244c8e42af2fb74e5ee73392a2e16480d (diff) | |
download | rneovim-e7e2115de5c1a4bafdf8b0819f97a0bea8de379b.tar.gz rneovim-e7e2115de5c1a4bafdf8b0819f97a0bea8de379b.tar.bz2 rneovim-e7e2115de5c1a4bafdf8b0819f97a0bea8de379b.zip |
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)
https://github.com/vim/vim/commit/989a70c590c2bd109eb362d3a0e48cb1427ae13d
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 15b5c3eef3..3abc39e7bf 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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; |