aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-05-17 22:07:32 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-05-17 22:07:32 +0200
commitb0d2ca9fb66d793e3c0f2e6ede811f1b16c33a9f (patch)
treefbfe9d56e1d77c963cb2db58ceb5035ff08257dc /src/wallet
parent1b53e4f67c6dbefadbfda7e40948840fe2b9da48 (diff)
wallet: Exit SyncMetaData if there are no transactions to sync
Instead of crash with an assertion error, simply exit the function `SyncMetaData` if there is no metadata to sync. Fixes #13110.
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 74f36e9abe..2a2f8b5b20 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -549,7 +549,9 @@ void CWallet::SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator> ran
}
}
- assert(copyFrom);
+ if (!copyFrom) {
+ return;
+ }
// Now copy data from copyFrom to rest:
for (TxSpends::iterator it = range.first; it != range.second; ++it)