0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-09-23 16:37:18 +01:00
parent 259a741044
commit 7f9a5a68fe
2 changed files with 4 additions and 1 deletions

View File

@@ -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)