diff options
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp index 7a5ea489b..568516007 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -3325,11 +3325,13 @@ i64 type_offset_of(Type *t, i32 index) { if (t->kind == Type_Struct) { type_set_offsets(t); if (gb_is_between(index, 0, t->Struct.fields.count-1)) { + GB_ASSERT(t->Struct.offsets != nullptr); return t->Struct.offsets[index]; } } else if (t->kind == Type_Tuple) { type_set_offsets(t); if (gb_is_between(index, 0, t->Tuple.variables.count-1)) { + GB_ASSERT(t->Tuple.offsets != nullptr); return t->Tuple.offsets[index]; } } else if (t->kind == Type_Basic) { |