From 29fef9ffd27143c4518610be74748e98cfcd4237 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 18 Mar 2014 16:41:01 -0500 Subject: [PATCH] Fix nil pointer dereference. Ran into by @toddfries and brought up on IRC. --- tx/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx/tx.go b/tx/tx.go index 11afa5c..2de7cee 100644 --- a/tx/tx.go +++ b/tx/tx.go @@ -1307,7 +1307,7 @@ func (rt *RecvTxOut) Addresses(net btcwire.BitcoinNet) (btcscript.ScriptClass, // IsCoinbase returns whether the received transaction output is an output // a coinbase transaction. func (rt *RecvTxOut) IsCoinbase() bool { - if rt.recvTxOut.block != nil { + if rt.recvTxOut.block == nil { return false } return rt.recvTxOut.block.Index == 0