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.
This commit is contained in:
Wladimir J. van der Laan 2018-05-17 22:07:32 +02:00
parent 1b53e4f67c
commit b0d2ca9fb6

View file

@ -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: // Now copy data from copyFrom to rest:
for (TxSpends::iterator it = range.first; it != range.second; ++it) for (TxSpends::iterator it = range.first; it != range.second; ++it)