forked from aniani/vim
patch 9.0.0949: crash when unletting a variable while listing variables
Problem: Crash when unletting a variable while listing variables. Solution: Disallow changing a hashtable while going over the entries. (closes #11435)
This commit is contained in:
@@ -1789,7 +1789,7 @@ prop_type_set(typval_T *argvars, int add)
|
||||
}
|
||||
hash_init(*htp);
|
||||
}
|
||||
hash_add(*htp, PT2HIKEY(prop));
|
||||
hash_add(*htp, PT2HIKEY(prop), "prop type");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1924,7 +1924,7 @@ f_prop_type_delete(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
ht = buf->b_proptypes;
|
||||
VIM_CLEAR(buf->b_proparray);
|
||||
}
|
||||
hash_remove(ht, hi);
|
||||
hash_remove(ht, hi, "prop type delete");
|
||||
vim_free(prop);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user