diff options
Diffstat (limited to 'type.c')
-rw-r--r-- | type.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -53,9 +53,11 @@ mkqualifiedtype(struct type *t, enum typequalifier tq) if (tq) { t = mktype(TYPEQUALIFIED, t); t->qualified.kind = tq; - t->size = t->base->size; - t->align = t->base->align; - t->repr = t->base->repr; + if (t->base) { + t->size = t->base->size; + t->align = t->base->align; + t->repr = t->base->repr; + } // XXX: incomplete? } return t; |