From 62a099cc6dbfc31c0ced3f6d895711208bf10518 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 7 Jan 2022 20:18:16 +0000 Subject: 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. --- src/version.c | 2 ++ src/vim9type.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/version.c b/src/version.c index 7f01ebe9f..e2b5023e3 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4034, /**/ 4033, /**/ diff --git a/src/vim9type.c b/src/vim9type.c index f28b88f23..6671f5e3d 100644 --- a/src/vim9type.c +++ b/src/vim9type.c @@ -375,7 +375,7 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int flags) 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); -- cgit v1.2.1