diff options
| author | Cozz Lovan <[email protected]> | 2014-03-05 15:05:44 +0100 |
|---|---|---|
| committer | Cozz Lovan <[email protected]> | 2014-03-05 15:05:44 +0100 |
| commit | ba51c7da408fad7986d52206ed30e181091c1a95 (patch) | |
| tree | 6b7794a4f5554a003e9380688153c0effa881a97 /src | |
| parent | Merge pull request #3798 (diff) | |
| download | discoin-ba51c7da408fad7986d52206ed30e181091c1a95.tar.xz discoin-ba51c7da408fad7986d52206ed30e181091c1a95.zip | |
Fix null pointer in IsTrusted()
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 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; |