diff options
author | Cozz Lovan <cozzlovan@yahoo.com> | 2014-03-05 15:05:44 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-03-05 19:40:22 +0100 |
commit | 8b68263ed3c78db309c650931c6c8fcd53dbfd34 (patch) | |
tree | bf902cc7a05665f215245ed71797369c7d28c541 /src | |
parent | d307681b181cbb05fce85a9331dc97c8c421cd53 (diff) |
Fix null pointer in IsTrusted()
Rebased-From: ba51c7d
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet.h | 4 |
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; |