changeset 31855:b7a8611dd9fc v9.0.1260

patch 9.0.1260: Coverity warns for possible NULL pointer usage Commit: https://github.com/vim/vim/commit/836137d89abfaddef688ff2c7e6a2f68d5dfca79 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 29 14:11:24 2023 +0000 patch 9.0.1260: Coverity warns for possible NULL pointer usage Problem: Coverity warns for possible NULL pointer usage. Solution: Change the condition.
author Bram Moolenaar <Bram@vim.org>
date Sun, 29 Jan 2023 15:15:04 +0100
parents 090c98379eb9
children 6d67ab084e42
files src/version.c src/vim9instr.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1260,
+/**/
     1259,
 /**/
     1258,
--- 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)