From: Bram Moolenaar Date: Sun, 29 Jan 2023 14:11:24 +0000 (+0000) Subject: patch 9.0.1260: Coverity warns for possible NULL pointer usage X-Git-Tag: v9.0.1260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=836137d89abfaddef688ff2c7e6a2f68d5dfca79;p=thirdparty%2Fvim.git patch 9.0.1260: Coverity warns for possible NULL pointer usage Problem: Coverity warns for possible NULL pointer usage. Solution: Change the condition. --- diff --git a/src/version.c b/src/version.c index 85fbc40c55..2324ff2138 100644 --- a/src/version.c +++ b/src/version.c @@ -695,6 +695,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1260, /**/ 1259, /**/ diff --git a/src/vim9instr.c b/src/vim9instr.c index cc0d8ad8b4..ce7342b7b7 100644 --- a/src/vim9instr.c +++ b/src/vim9instr.c @@ -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)