diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-05-18 12:31:01 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-05-18 12:53:16 +0200 |
commit | 1a8b12c69c0158e6440c53a34b03a32fc0580878 (patch) | |
tree | 9badb15852314a4eab537515e198465f3bf1120f /src | |
parent | e54550303bc9b8f2ce5d68116af80502be8a2a94 (diff) | |
parent | b0d2ca9fb66d793e3c0f2e6ede811f1b16c33a9f (diff) |
Merge #13265: wallet: Exit SyncMetaData if there are no transactions to sync
b0d2ca9fb66d793e3c0f2e6ede811f1b16c33a9f wallet: Exit SyncMetaData if there are no transactions to sync (Wladimir J. van der Laan)
Pull request description:
Instead of crash with an assertion error, simply exit the function `SyncMetaData` if there is no metadata to sync.
Fixes #13110.
Tree-SHA512: 44c4789497b5b63963bef66d8b695987dde80764199f6ea0f2c974be19d29c2663f32446a663a2ee9029e143e5d1d9e8a591e52e6e7e795b982782626bec25bb
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
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) |