Mercurial > vim
changeset 30445:0cf9615b8d37 v9.0.0558
patch 9.0.0558: Coverity warns for possibly using NULL pointer
Commit: https://github.com/vim/vim/commit/7f9a5a68fe363db467a505502237c1e8479c1436
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 23 16:37:18 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 23 Sep 2022 17:45:03 +0200 |
parents | 2136cce5f5fa |
children | 58da8a140312 |
files | src/eval.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)