aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-03-05 19:39:34 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-05 19:39:59 +0100
commitf5352da49007a7655cc45a32521923c9c87c6bfa (patch)
tree6b7794a4f5554a003e9380688153c0effa881a97 /src
parent334bd22e75b1955b3dfefbf4f5e065afdbc46ae4 (diff)
parentba51c7da408fad7986d52206ed30e181091c1a95 (diff)
Merge pull request #3804
ba51c7d Fix null pointer in IsTrusted() (Cozz Lovan)
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;