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