diff options
author | 21E14 <21xe14@gmail.com> | 2014-10-27 23:00:55 -0400 |
---|---|---|
committer | 21E14 <21xe14@gmail.com> | 2014-11-22 00:12:41 -0500 |
commit | 730b1ed1a0d2b2b0f278ee808e7e266a50fac94b (patch) | |
tree | ee9a86546c32522d3d85854c7bf7a54857ca7468 /src/main.cpp | |
parent | 35ece7dd074e1cb1b00ffb89dc6a6de063145b53 (diff) |
Check pindexBestForkBase for null
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 0cfe90beda..cd4bfbfb92 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1211,13 +1211,13 @@ void CheckForkWarningConditions() if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6))) { - if (!fLargeWorkForkFound) + if (!fLargeWorkForkFound && pindexBestForkBase) { std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") + pindexBestForkBase->phashBlock->ToString() + std::string("'"); CAlert::Notify(warning, true); } - if (pindexBestForkTip) + if (pindexBestForkTip && pindexBestForkBase) { LogPrintf("CheckForkWarningConditions: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n", pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(), |