diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-18 13:24:52 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-18 13:24:52 +0000 |
commit | 56acd1f8ed4d86e92684f90b3b8e0e9a355208d1 (patch) | |
tree | 3a73053a17bce787b6f3af483c96da5db22837bd /src/vim9execute.c | |
parent | 0257599036ceb3658b27a4de07834ca0d2fa418e (diff) | |
download | vim-git-8.2.4413.tar.gz |
patch 8.2.4413: Vim9: Coverity warns for using NULL pointerv8.2.4413
Problem: Vim9: Coverity warns for using NULL pointer.
Solution: Give an internal error when funcref function can't be found.
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index d2c7d5daa..3c23ad411 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -3553,6 +3553,12 @@ exec_instructions(ectx_T *ectx) { ufunc = find_func(funcref->fr_func_name, FALSE); } + if (ufunc == NULL) + { + SOURCING_LNUM = iptr->isn_lnum; + iemsg("ufunc unexpectedly NULL for FUNCREF"); + goto theend; + } if (fill_partial_and_closure(pt, ufunc, ectx) == FAIL) goto theend; tv = STACK_TV_BOT(0); |