Check pindexBestForkBase->phashBlock for NULL reference

This commit is contained in:
Evan Duffield 2015-01-23 06:29:06 -07:00
parent 70eb4efd2f
commit 3aa0a68e00

View File

@ -1745,10 +1745,12 @@ void CheckForkWarningConditions()
{
if (!fLargeWorkForkFound)
{
if(pindexBestForkBase->phashBlock != NULL){
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
pindexBestForkBase->phashBlock->ToString() + std::string("'");
CAlert::Notify(warning, true);
}
}
if (pindexBestForkTip)
{
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",