forked from aniani/vim
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:
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4034,
|
||||||
/**/
|
/**/
|
||||||
4033,
|
4033,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -375,7 +375,7 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int flags)
|
|||||||
set_function_type(ufunc);
|
set_function_type(ufunc);
|
||||||
if (ufunc->uf_func_type != NULL)
|
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)
|
&& tv->vval.v_partial->pt_argc > 0)
|
||||||
{
|
{
|
||||||
type = get_type_ptr(type_gap);
|
type = get_type_ptr(type_gap);
|
||||||
|
Reference in New Issue
Block a user