Fix null pointer in IsTrusted()

This commit is contained in:
Cozz Lovan 2014-03-05 15:05:44 +01:00
parent 334bd22e75
commit ba51c7da40

View file

@ -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;