VPP-608: fix coverity warning in vppapigen

Change-Id: Ic26216bb03d941c1625a61c1c3340d2d70d84bd0
Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
Dave Barach
2017-03-02 07:38:52 -05:00
committed by Damjan Marion
parent 0eb22efbb5
commit a80ab84531

View File

@ -754,7 +754,7 @@ void node_complex_generate (node_t *this, enum passid which, FILE *fp)
union_prefix, member_name);
indent_me(fp);
if (deeper->type == NODE_VECTOR)
if (deeper && deeper->type == NODE_VECTOR)
fprintf(fp, "%s_print(a->%s%s, handle);\n",
CDATA0, union_prefix, member_name);
else
@ -778,7 +778,7 @@ void node_complex_generate (node_t *this, enum passid which, FILE *fp)
}
indent_me(fp);
if (deeper->type == NODE_VECTOR)
if (deeper && deeper->type == NODE_VECTOR)
fprintf(fp, "%s_endian(a->%s%s);\n",
CDATA0, union_prefix, member_name);
else