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)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 2be7fe1..4521835 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -4382,6 +4382,8 @@
/* 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)