diff --git a/compiler/compiler.go b/compiler/compiler.go index 48a03550..db5d442c 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -1054,6 +1054,7 @@ func (c *Compiler) parseInstr(frame *Frame, instr ssa.Instruction) { case *ssa.Store: llvmAddr := c.getValue(frame, instr.Addr) llvmVal := c.getValue(frame, instr.Val) + c.emitNilCheck(frame, llvmAddr, "store") if c.targetData.TypeAllocSize(llvmVal.Type()) == 0 { // nothing to store return