From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- tools/widl/header.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c index b7497e215d5..554b40fa46f 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -184,8 +184,9 @@ static void write_fields(FILE *h, var_list_t *fields, enum name_type name_type) }
LIST_FOR_EACH_ENTRY( v, fields, var_t, entry ) { - expr_t *contract = get_attrp(v->attrs, ATTR_CONTRACT); + expr_t *contract; if (!v || !v->declspec.type) continue; + contract = get_attrp(v->attrs, ATTR_CONTRACT); if (contract) write_apicontract_guard_start(h, contract);
indent(h, 0);