Skip to content

Commit

Permalink
getLastBlockDate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tranz5 committed May 19, 2014
1 parent 6b70241 commit 85d6529
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ int ClientModel::getNumBlocksAtStartup()

QDateTime ClientModel::getLastBlockDate() const
{
return QDateTime::fromTime_t(pindexBest->GetBlockTime());
if (pindexBest)
return QDateTime::fromTime_t(pindexBest->GetBlockTime());
else
return QDateTime::fromTime_t(1371910055); // Genesis block's time
}

void ClientModel::updateTimer()
Expand Down

0 comments on commit 85d6529

Please sign in to comment.