mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-03-11 21:21:14 +00:00
Prevent Qt crash at startup with an empty data directory
This commit is contained in:
parent
ac7b8ea086
commit
85b534b23e
@ -48,7 +48,10 @@ int ClientModel::getNumBlocksAtStartup()
|
|||||||
|
|
||||||
QDateTime ClientModel::getLastBlockDate() const
|
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()
|
void ClientModel::updateTimer()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user