Skip to content

Commit 296c956

Browse files
committed
wallet: guard null m_last_block_processed
1 parent 0dfebf4 commit 296c956

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ void CWallet::BlockUntilSyncedToCurrentChain() {
13231323
AssertLockNotHeld(cs_main);
13241324
AssertLockNotHeld(cs_wallet);
13251325

1326-
{
1326+
if (m_last_block_processed) {
13271327
// Skip the queue-draining stuff if we know we're caught up with
13281328
// chainActive.Tip()...
13291329
// We could also take cs_wallet here, and call m_last_block_processed

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
529529
*
530530
* Protected by cs_main (see BlockUntilSyncedToCurrentChain)
531531
*/
532-
const CBlockIndex* m_last_block_processed;
532+
const CBlockIndex* m_last_block_processed{nullptr};
533533

534534
int64_t nNextResend;
535535
int64_t nLastResend;

0 commit comments

Comments
 (0)