0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-01-07 20:18:16 +00:00
parent a4c96252b1
commit 62a099cc6d
2 changed files with 3 additions and 1 deletions

View File

@@ -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);