mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.4413: Vim9: Coverity warns for using NULL pointer
Problem: Vim9: Coverity warns for using NULL pointer. Solution: Give an internal error when funcref function can't be found.
This commit is contained in:
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4413,
|
||||||
/**/
|
/**/
|
||||||
4412,
|
4412,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -3553,6 +3553,12 @@ exec_instructions(ectx_T *ectx)
|
|||||||
{
|
{
|
||||||
ufunc = find_func(funcref->fr_func_name, FALSE);
|
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)
|
if (fill_partial_and_closure(pt, ufunc, ectx) == FAIL)
|
||||||
goto theend;
|
goto theend;
|
||||||
tv = STACK_TV_BOT(0);
|
tv = STACK_TV_BOT(0);
|
||||||
|
Reference in New Issue
Block a user