Skip to content

Commit

Permalink
wallet: guard null m_last_block_processed
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Feb 21, 2021
1 parent 0dfebf4 commit 296c956
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ void CWallet::BlockUntilSyncedToCurrentChain() {
AssertLockNotHeld(cs_main);
AssertLockNotHeld(cs_wallet);

{
if (m_last_block_processed) {
// Skip the queue-draining stuff if we know we're caught up with
// chainActive.Tip()...
// We could also take cs_wallet here, and call m_last_block_processed
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
*
* Protected by cs_main (see BlockUntilSyncedToCurrentChain)
*/
const CBlockIndex* m_last_block_processed;
const CBlockIndex* m_last_block_processed{nullptr};

int64_t nNextResend;
int64_t nLastResend;
Expand Down

0 comments on commit 296c956

Please sign in to comment.