diff src/eval.c @ 22021:514d622473af v8.2.1560

patch 8.2.1560: using NULL pointers in some code Commit: https://github.com/vim/vim/commit/9c2b06637b32742cac11bfd66b1a4e84583c6c2e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 1 19:56:15 2020 +0200 patch 8.2.1560: using NULL pointers in some code Problem: Using NULL pointers in some code. (James McCoy) Solution: Avoid adding to a NULL pointer. Use byte as unsigned.
author Bram Moolenaar <Bram@vim.org>
date Tue, 01 Sep 2020 20:00:03 +0200
parents a9e60176dcd3
children 7899b4e2880c
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -395,7 +395,7 @@ skip_expr_concatenate(
     typval_T	rettv;
     int		res;
     int		vim9script = in_vim9script();
-    garray_T    *gap = &evalarg->eval_ga;
+    garray_T    *gap = evalarg == NULL ? NULL : &evalarg->eval_ga;
     int		save_flags = evalarg == NULL ? 0 : evalarg->eval_flags;
     int		evaluate = evalarg == NULL
 			       ? FALSE : (evalarg->eval_flags & EVAL_EVALUATE);