From c45cad5d0a34782ae0f8c2a8763007cd00f7d618 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 4 Feb 2009 12:58:10 +0000 Subject: [PATCH] Before testing the kind of an entity, make sure we got an entity at all. [r25424] --- parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parser.c b/parser.c index 611574c..f25927a 100644 --- a/parser.c +++ b/parser.c @@ -4194,6 +4194,8 @@ static bool has_parameters(void) /* func(void) is not a parameter */ if (token.type == T_IDENTIFIER) { entity_t const *const entity = get_entity(token.v.symbol, NAMESPACE_NORMAL); + if (entity == NULL) + return true; if (entity->kind != ENTITY_TYPEDEF) return true; if (skip_typeref(entity->typedefe.type) != type_void) -- 2.20.1