print error and return NULL when trying to create an invalid member access

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-12 18:44:58 +02:00
parent fc7d32a715
commit 60a5d8ab4f

5
ir.c
View file

@ -589,6 +589,11 @@ ir_value* ir_value_vector_member(ir_value *self, unsigned int member)
self->members[member] = m;
m->code.addroffset = member;
}
else
{
printf("invalid member access on %s\n", self->name);
return NULL;
}
return m;
}