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.
diff --git a/src/version.c b/src/version.c
index 7f01ebe..e2b5023 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4034,
+/**/
4033,
/**/
4032,
diff --git a/src/vim9type.c b/src/vim9type.c
index f28b88f..6671f5e 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -375,7 +375,7 @@
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);