]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.1162: crash when using a lambda v8.2.1162
authorBram Moolenaar <Bram@vim.org>
Wed, 8 Jul 2020 20:24:09 +0000 (22:24 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 8 Jul 2020 20:24:09 +0000 (22:24 +0200)
Problem:    Crash when using a lambda.
Solution:   Check for evalarg to be NULL.

src/userfunc.c
src/version.c

index 6858068c8220b777326a4b7cd837ea904a64242a..2f253c95fd6cafdc624c09fbda73685a97b469e8 100644 (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);
index 88863828937043b3c7abed86af88cc08d95e6899..6cd091b58255492c63a35e9e27bd46e10b43aa8d 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1162,
 /**/
     1161,
 /**/