0
0
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:
Bram Moolenaar 2020-07-08 22:24:09 +02:00
parent 8e2730a315
commit efaaaa683b
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1162,
/**/
1161,
/**/