changeset 27010:b049c3b63a67 v8.2.4034

patch 8.2.4034: Coverity warns for possibly using a NULL pointer Commit: https://github.com/vim/vim/commit/62a099cc6dbfc31c0ced3f6d895711208bf10518 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 7 20:18:16 2022 +0000 patch 8.2.4034: Coverity warns for possibly using a NULL pointer Problem: Coverity warns for possibly using a NULL pointer. Solution: Check v_partial is not NULL.
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Jan 2022 21:30:02 +0100
parents e7dd2a34a3bc
children f9d3d0c55a78
files src/version.c src/vim9type.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4034,
+/**/
     4033,
 /**/
     4032,
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -375,7 +375,7 @@ typval2type_int(typval_T *tv, int copyID
 		set_function_type(ufunc);
 	    if (ufunc->uf_func_type != NULL)
 	    {
-		if (tv->v_type == VAR_PARTIAL
+		if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial != NULL
 					    && tv->vval.v_partial->pt_argc > 0)
 		{
 		    type = get_type_ptr(type_gap);