diff options
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 0269c29b1a..30f40b3a1e 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -13107,8 +13107,7 @@ static IrInstruction *ir_get_var_ptr(IrAnalyze *ira, IrInstruction *instruction, assert(ira->codegen->errors.length != 0); return ira->codegen->invalid_instruction; } - assert(var->value->type); - if (type_is_invalid(var->value->type)) + if (var->value->type == nullptr || type_is_invalid(var->value->type)) return ira->codegen->invalid_instruction; bool comptime_var_mem = ir_get_var_is_comptime(var); |
