aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-03-05 15:05:44 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-05 19:40:22 +0100
commit8b68263ed3c78db309c650931c6c8fcd53dbfd34 (patch)
treebf902cc7a05665f215245ed71797369c7d28c541 /src
parentd307681b181cbb05fce85a9331dc97c8c421cd53 (diff)
Fix null pointer in IsTrusted()
Rebased-From: ba51c7d
Diffstat (limited to 'src')
-rw-r--r--src/wallet.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 7feb86d294..e2e89fffe7 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -675,8 +675,10 @@ public:
{
// Transactions not sent by us: not trusted
const CWalletTx* parent = pwallet->GetWalletTx(txin.prevout.hash);
+ if (parent == NULL)
+ return false;
const CTxOut& parentOut = parent->vout[txin.prevout.n];
- if (parent == NULL || !pwallet->IsMine(parentOut))
+ if (!pwallet->IsMine(parentOut))
return false;
}
return true;