aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2017-08-28 09:24:17 +0200
committerpracticalswift <[email protected]>2017-09-06 10:45:37 +0200
commitfdc329376c8a0fa4dffd0cd2599a494a64c38472 (patch)
tree2e2052bb1fced6b82e6eb58adb64c7c9bf23fcf8 /src/wallet/wallet.cpp
parentMerge #10596: Add vConnect to CConnman::Options (diff)
downloaddiscoin-fdc329376c8a0fa4dffd0cd2599a494a64c38472.tar.xz
discoin-fdc329376c8a0fa4dffd0cd2599a494a64c38472.zip
Document assumptions that are being made to avoid NULL pointer dereferences
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index d1d2060b0..36d6ce000 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -519,6 +519,7 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran
const uint256& hash = it->second;
CWalletTx* copyTo = &mapWallet[hash];
if (copyFrom == copyTo) continue;
+ assert(copyFrom && "Oldest wallet transaction in range assumed to have been found.");
if (!copyFrom->IsEquivalentTo(*copyTo)) continue;
copyTo->mapValue = copyFrom->mapValue;
copyTo->vOrderForm = copyFrom->vOrderForm;