patch 9.0.1260: Coverity warns for possible NULL pointer usage

Problem:    Coverity warns for possible NULL pointer usage.
Solution:   Change the condition.
This commit is contained in:
Bram Moolenaar
2023-01-29 14:11:24 +00:00
parent 492324e588
commit 836137d89a
2 changed files with 3 additions and 1 deletions

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1260,
/**/
1259,
/**/

View File

@ -1794,7 +1794,7 @@ generate_CALL(
: ufunc->uf_def_status != UF_NOT_COMPILED
? ISN_DCALL : ISN_UCALL)) == NULL)
return FAIL;
if (isn->isn_type == ISN_METHODCALL)
if (cl != NULL /* isn->isn_type == ISN_METHODCALL */)
{
isn->isn_arg.mfunc = ALLOC_ONE(cmfunc_T);
if (isn->isn_arg.mfunc == NULL)