Fix segfault in dereferencing undefined field containers

This commit is contained in:
Bill Currie 2020-02-22 14:04:10 +09:00
parent c296514b95
commit e7b4eedc07

View file

@ -1162,9 +1162,10 @@ field_expr (expr_t *e1, expr_t *e2)
const type_t *t1, *t2; const type_t *t1, *t2;
expr_t *e; expr_t *e;
t1 = get_type (e1);
if (e1->type == ex_error) if (e1->type == ex_error)
return e1; return e1;
t1 = unalias_type (get_type (e1)); t1 = unalias_type (t1);
if (t1->type == ev_entity) { if (t1->type == ev_entity) {
symbol_t *field = 0; symbol_t *field = 0;