comparison src/ex_cmds2.c @ 17151:ebe9aab81898 v8.1.1575

patch 8.1.1575: callbacks may be garbage collected commit https://github.com/vim/vim/commit/75a1a9415b9c207de5a29b25c0d1949c6c9c5c61 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 20 03:45:36 2019 +0200 patch 8.1.1575: callbacks may be garbage collected Problem: Callbacks may be garbage collected. Solution: Set reference in callbacks. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/4564)
author Bram Moolenaar <Bram@vim.org>
date Thu, 20 Jun 2019 04:00:07 +0200
parents af861fccc309
children 40c4cb095d53
comparison
equal deleted inserted replaced
17150:96373bb9c0eb 17151:ebe9aab81898
564 { 564 {
565 int abort = FALSE; 565 int abort = FALSE;
566 timer_T *timer; 566 timer_T *timer;
567 typval_T tv; 567 typval_T tv;
568 568
569 for (timer = first_timer; timer != NULL; timer = timer->tr_next) 569 for (timer = first_timer; !abort && timer != NULL; timer = timer->tr_next)
570 { 570 {
571 if (timer->tr_callback.cb_partial != NULL) 571 if (timer->tr_callback.cb_partial != NULL)
572 { 572 {
573 tv.v_type = VAR_PARTIAL; 573 tv.v_type = VAR_PARTIAL;
574 tv.vval.v_partial = timer->tr_callback.cb_partial; 574 tv.vval.v_partial = timer->tr_callback.cb_partial;