From 008e91db6a776303e605808ba840d92bb16d69ca Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 4 Dec 2014 12:43:12 +0100 Subject: [PATCH] null ptr fix --- core/state_transition.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/state_transition.go b/core/state_transition.go index 3c45ddbf9..820ba66e6 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -141,9 +141,8 @@ func (self *StateTransition) TransitionState() (err error) { } var ( - tx = self.tx - sender = self.Sender() - receiver *state.StateObject + tx = self.tx + sender = self.Sender() ) defer self.RefundGas() @@ -175,7 +174,7 @@ func (self *StateTransition) TransitionState() (err error) { if tx.CreatesContract() { self.rec = MakeContract(tx, self.state) - ret, err, ref = vmenv.Create(sender, receiver.Address(), self.tx.Data, self.gas, self.gasPrice, self.value) + ret, err, ref = vmenv.Create(sender, self.rec.Address(), self.tx.Data, self.gas, self.gasPrice, self.value) ref.SetCode(ret) } else { ret, err = vmenv.Call(self.Sender(), self.Receiver().Address(), self.tx.Data, self.gas, self.gasPrice, self.value)