Skip to content

Commit f5352da

Browse files
committed
Merge pull request #3804
ba51c7d Fix null pointer in IsTrusted() (Cozz Lovan)
2 parents 334bd22 + ba51c7d commit f5352da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wallet.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,10 @@ class CWalletTx : public CMerkleTx
675675
{
676676
// Transactions not sent by us: not trusted
677677
const CWalletTx* parent = pwallet->GetWalletTx(txin.prevout.hash);
678+
if (parent == NULL)
679+
return false;
678680
const CTxOut& parentOut = parent->vout[txin.prevout.n];
679-
if (parent == NULL || !pwallet->IsMine(parentOut))
681+
if (!pwallet->IsMine(parentOut))
680682
return false;
681683
}
682684
return true;

0 commit comments

Comments
 (0)