summaryrefslogtreecommitdiff
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 74dae92b5..3efa8ca2e 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1183,6 +1183,7 @@ timer_callback(timer_T *timer)
/*
* Call timers that are due.
* Return the time in msec until the next timer is due.
+ * Returns -1 if there are no pending timers.
*/
long
check_due_timer(void)
@@ -1197,6 +1198,10 @@ check_due_timer(void)
# ifdef WIN3264
LARGE_INTEGER fr;
+ /* Don't run any timers while exiting. */
+ if (exiting)
+ return next_due;
+
QueryPerformanceFrequency(&fr);
# endif
profile_start(&now);