mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge pull request #2248 from gavinandresen/issue2239
Prevent Qt crash at startup with an empty data directory
This commit is contained in:
commit
4dfae2fd2f
@ -48,7 +48,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(1231006505); // Genesis block's time
|
||||
}
|
||||
|
||||
void ClientModel::updateTimer()
|
||||
|
Loading…
Reference in New Issue
Block a user