From 7f9a5a68fe363db467a505502237c1e8479c1436 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 23 Sep 2022 16:37:18 +0100 Subject: [PATCH] patch 9.0.0558: Coverity warns for possibly using NULL pointer Problem: Coverity warns for possibly using NULL pointer. Solution: Only use "evalarg" when not NULL. --- src/eval.c | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index d369df5e0..0102bd70b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6380,7 +6380,8 @@ handle_subscript( **arg = NUL; idx = find_exported(rettv->vval.v_number, exp_name, &ufunc, &type, - evalarg->eval_cctx, evalarg->eval_cstack, verbose); + evalarg == NULL ? NULL : evalarg->eval_cctx, + evalarg == NULL ? NULL : evalarg->eval_cstack, verbose); **arg = cc; if (idx < 0 && ufunc == NULL) diff --git a/src/version.c b/src/version.c index f01afe386..48f2ca559 100644 --- a/src/version.c +++ b/src/version.c @@ -699,6 +699,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 558, /**/ 557, /**/ -- 2.40.0