From 092528d87aba350c01f58b4c24cc4405d2da2f57 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 14 Dec 2014 18:48:43 +0100 Subject: [PATCH] Minor fix for finalize. --- libethereum/Executive.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libethereum/Executive.cpp b/libethereum/Executive.cpp index 438505f1a..ed3077628 100644 --- a/libethereum/Executive.cpp +++ b/libethereum/Executive.cpp @@ -220,7 +220,8 @@ bool Executive::go(OnOpFunc const& _onOp) void Executive::finalize(OnOpFunc const&) { // SSTORE refunds. - m_endGas += min((m_t.gas() - m_endGas) / 2, m_ext->sub.refunds); + if (m_ext) + m_endGas += min((m_t.gas() - m_endGas) / 2, m_ext->sub.refunds); // cnote << "Refunding" << formatBalance(m_endGas * m_ext->gasPrice) << "to origin (=" << m_endGas << "*" << formatBalance(m_ext->gasPrice) << ")"; m_s.addBalance(m_sender, m_endGas * m_t.gasPrice());