diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-11-04 10:38:48 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2019-11-04 20:33:40 +0100 |
| commit | 2b4bf1e7ced151482ce741788eadcb39f6d60f72 (patch) | |
| tree | 89a1618cd0f63d9c5f2f4edfbf06dfd64a7807b3 /src | |
| parent | 61825062aadd68e6cd2e864c717b3a8ce482258d (diff) | |
| download | zig-2b4bf1e7ced151482ce741788eadcb39f6d60f72.tar.gz zig-2b4bf1e7ced151482ce741788eadcb39f6d60f72.zip | |
Fix crash in #3483
The bytesToSlice is still not evaluated at comptime but at least it
doesn't crash anymore.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index ce0e204e63..ea87999454 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -1668,7 +1668,7 @@ static IrInstruction *ir_build_resize_slice(IrAnalyze *ira, IrInstruction *sourc instruction->result_loc = result_loc; ir_ref_instruction(operand, ira->new_irb.current_basic_block); - ir_ref_instruction(result_loc, ira->new_irb.current_basic_block); + if (result_loc != nullptr) ir_ref_instruction(result_loc, ira->new_irb.current_basic_block); return &instruction->base; } |
