From b0d2ca9fb66d793e3c0f2e6ede811f1b16c33a9f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 17 May 2018 22:07:32 +0200 Subject: 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. --- src/wallet/wallet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ran } } - assert(copyFrom); + if (!copyFrom) { + return; + } // Now copy data from copyFrom to rest: for (TxSpends::iterator it = range.first; it != range.second; ++it) -- cgit v1.2.3