forked from aniani/vim
patch 8.2.2579: Vim9: crash in garbagecollect after for loop
Problem: Vim9: crash in garbagecollect after for loop. Solution: Do not set a reference in script item when the name was cleared. (closes #7935)
This commit is contained in:
@@ -319,7 +319,8 @@ garbage_collect_scriptvars(int copyID)
|
||||
{
|
||||
svar_T *sv = ((svar_T *)si->sn_var_vals.ga_data) + idx;
|
||||
|
||||
abort = abort || set_ref_in_item(sv->sv_tv, copyID, NULL, NULL);
|
||||
if (sv->sv_name != NULL)
|
||||
abort = abort || set_ref_in_item(sv->sv_tv, copyID, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2579,
|
||||
/**/
|
||||
2578,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user