0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.1575: callbacks may be garbage collected

Problem:    Callbacks may be garbage collected.
Solution:   Set reference in callbacks. (Ozaki Kiichi, closes #4564)
This commit is contained in:
Bram Moolenaar
2019-06-20 03:45:36 +02:00
parent a3fce62c91
commit 75a1a9415b
13 changed files with 164 additions and 7 deletions

View File

@@ -4051,7 +4051,7 @@ set_ref_in_term(int copyID)
term_T *term;
typval_T tv;
for (term = first_term; term != NULL; term = term->tl_next)
for (term = first_term; !abort && term != NULL; term = term->tl_next)
if (term->tl_job != NULL)
{
tv.v_type = VAR_JOB;