From fdc329376c8a0fa4dffd0cd2599a494a64c38472 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 28 Aug 2017 09:24:17 +0200 Subject: Document assumptions that are being made to avoid NULL pointer dereferences --- src/wallet/wallet.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet/wallet.cpp') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d1d2060b0c..36d6ce0007 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -519,6 +519,7 @@ void CWallet::SyncMetaData(std::pair 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; -- cgit v1.2.3