mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1162: crash when using a lambda
Problem: Crash when using a lambda. Solution: Check for evalarg to be NULL.
This commit is contained in:
parent
8e2730a315
commit
efaaaa683b
@ -508,7 +508,7 @@ get_lambda_tv(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
}
|
||||
|
||||
eval_lavars_used = old_eval_lavars;
|
||||
if (evalarg->eval_tofree == NULL)
|
||||
if (evalarg != NULL && evalarg->eval_tofree == NULL)
|
||||
evalarg->eval_tofree = tofree;
|
||||
else
|
||||
vim_free(tofree);
|
||||
@ -519,7 +519,7 @@ errret:
|
||||
ga_clear_strings(&newlines);
|
||||
vim_free(fp);
|
||||
vim_free(pt);
|
||||
if (evalarg->eval_tofree == NULL)
|
||||
if (evalarg != NULL && evalarg->eval_tofree == NULL)
|
||||
evalarg->eval_tofree = tofree;
|
||||
else
|
||||
vim_free(tofree);
|
||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1162,
|
||||
/**/
|
||||
1161,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user