From 75a1a9415b9c207de5a29b25c0d1949c6c9c5c61 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 20 Jun 2019 03:45:36 +0200 Subject: patch 8.1.1575: callbacks may be garbage collected Problem: Callbacks may be garbage collected. Solution: Set reference in callbacks. (Ozaki Kiichi, closes #4564) --- src/ex_cmds2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ex_cmds2.c') diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index af7aa4b8ea..2537e8d7b4 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -566,7 +566,7 @@ set_ref_in_timer(int copyID) timer_T *timer; typval_T tv; - for (timer = first_timer; timer != NULL; timer = timer->tr_next) + for (timer = first_timer; !abort && timer != NULL; timer = timer->tr_next) { if (timer->tr_callback.cb_partial != NULL) { -- cgit v1.2.3