diff --git a/src/main.cpp b/src/main.cpp index 67ba03d79..a772de50b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -352,8 +352,9 @@ namespace { int GetHeight() { - if ( chainActive.LastTip() != 0 ) - return chainActive.LastTip()->GetHeight(); + CBlockIndex *pindex; + if ( (pindex= chainActive.LastTip()) != 0 ) + return pindex->GetHeight(); else return(-1); }