mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
vim-patch:8.2.1162: crash when using a lambda
Problem: Crash when using a lambda.
Solution: Check for evalarg to be NULL.
efaaaa683b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
cc7a50a9ae
commit
c804c7df0c
@ -366,7 +366,7 @@ int get_lambda_tv(char **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 {
|
||||
xfree(tofree);
|
||||
@ -377,7 +377,7 @@ errret:
|
||||
ga_clear_strings(&newargs);
|
||||
xfree(fp);
|
||||
xfree(pt);
|
||||
if (evalarg->eval_tofree == NULL) {
|
||||
if (evalarg != NULL && evalarg->eval_tofree == NULL) {
|
||||
evalarg->eval_tofree = tofree;
|
||||
} else {
|
||||
xfree(tofree);
|
||||
|
Loading…
Reference in New Issue
Block a user