Check null LastTip()

This commit is contained in:
jl777
2019-07-02 01:39:12 -11:00
parent 5e7fb0d473
commit 1e80fc44ec

View File

@@ -352,7 +352,9 @@ namespace {
int GetHeight()
{
return chainActive.LastTip()->GetHeight();
if ( chainActive.LastTip() != 0 )
return chainActive.LastTip()->GetHeight();
else return(-1);
}
void UpdatePreferredDownload(CNode* node, CNodeState* state)