# HG changeset patch # User Bram Moolenaar # Date 1594240203 -7200 # Node ID a4d00a2dadd6ff90fb71808e7d204b4d8577c9bb # Parent 4bd7d87a5dbb03f536b837c7892a89aa52f0cd96 patch 8.2.1162: crash when using a lambda Commit: https://github.com/vim/vim/commit/efaaaa683b7b0cebc128be5c0c257b9d6578ac96 Author: Bram Moolenaar Date: Wed Jul 8 22:24:09 2020 +0200 patch 8.2.1162: crash when using a lambda Problem: Crash when using a lambda. Solution: Check for evalarg to be NULL. diff --git a/src/userfunc.c b/src/userfunc.c --- a/src/userfunc.c +++ b/src/userfunc.c @@ -508,7 +508,7 @@ get_lambda_tv(char_u **arg, typval_T *re } 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); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1162, +/**/ 1161, /**/ 1160,