From ba51c7da408fad7986d52206ed30e181091c1a95 Mon Sep 17 00:00:00 2001 From: Cozz Lovan Date: Wed, 5 Mar 2014 15:05:44 +0100 Subject: [PATCH] Fix null pointer in IsTrusted() --- src/wallet.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet.h b/src/wallet.h index 7feb86d29..e2e89fffe 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;