From 54c8a10fe4728aa9c0e298cab9ebdf1dacb3c4b1 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Feb 2011 21:31:14 +0900 Subject: [PATCH] Don't trip over incomplete structs (again:P) --- tools/qfcc/source/type.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index a0e49f64d..7aacab1d6 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -409,11 +409,13 @@ print_type_str (dstring_t *str, type_t *type) { const char *tag = "struct"; - if (type->t.symtab->type == stab_union) - tag = "union"; - else if (type->t.symtab->type == stab_union) - tag = "enum"; - dasprintf (str, " %s %s", tag, type->name);//FIXME + if (type->t.symtab) {//FIXME + if (type->t.symtab->type == stab_union) + tag = "union"; + else if (type->t.symtab->type == stab_union) + tag = "enum"; + } + dasprintf (str, " %s %s", tag, type->name); } break; case ty_array: