diff options
Diffstat (limited to 'identifiers.c')
-rw-r--r-- | identifiers.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/identifiers.c b/identifiers.c index 3dc4099..c29f8ce 100644 --- a/identifiers.c +++ b/identifiers.c @@ -196,5 +196,7 @@ static Value *ident_decl_val(Identifier i) { } static inline Type *ident_typeval(Identifier i) { - return ident_decl_val(i)->type; + Value *val = ident_decl_val(i); + if (!val) return NULL; + return val->type; } |