aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index cf396e5509..3ed246d1b5 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -489,7 +489,7 @@ TypeTableEntry *get_array_type(CodeGen *g, TypeTableEntry *child_type, uint64_t
return entry;
} else {
TypeTableEntry *entry = new_type_table_entry(TypeTableEntryIdArray);
- entry->type_ref = LLVMArrayType(child_type->type_ref, array_size);
+ entry->type_ref = child_type->type_ref ? LLVMArrayType(child_type->type_ref, array_size) : nullptr;
entry->zero_bits = (array_size == 0) || child_type->zero_bits;
entry->deep_const = child_type->deep_const;