Browse Source

Avoid potential coredump if pindex is NULL

pull/250/head
Jonathan "Duke" Leto 2 years ago
parent
commit
ca52c6beb8
  1. 2
      src/wallet/wallet.cpp

2
src/wallet/wallet.cpp

@ -2771,7 +2771,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
// our wallet birthday (as adjusted for block time variability)
while (pindex && nTimeFirstKey && (pindex->GetBlockTime() < (nTimeFirstKey - 7200))) {
pindex = chainActive.Next(pindex);
pwalletMain->rescanHeight = pindex->GetHeight();
pwalletMain->rescanHeight = pindex ? pindex->GetHeight() : 0;
}
ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup

Loading…
Cancel
Save