comparison src/terminal.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 2a9a5e69fb3e
children 278583ff5e44
comparison
equal deleted inserted replaced
17150:96373bb9c0eb 17151:ebe9aab81898
4049 { 4049 {
4050 int abort = FALSE; 4050 int abort = FALSE;
4051 term_T *term; 4051 term_T *term;
4052 typval_T tv; 4052 typval_T tv;
4053 4053
4054 for (term = first_term; term != NULL; term = term->tl_next) 4054 for (term = first_term; !abort && term != NULL; term = term->tl_next)
4055 if (term->tl_job != NULL) 4055 if (term->tl_job != NULL)
4056 { 4056 {
4057 tv.v_type = VAR_JOB; 4057 tv.v_type = VAR_JOB;
4058 tv.vval.v_job = term->tl_job; 4058 tv.vval.v_job = term->tl_job;
4059 abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL); 4059 abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);