PPCoin: bug fix of GetBlockTrust() introduced with 32ad4f42
[novacoin.git] / src / main.h
index 1bcad19..6e5cac5 100644 (file)
@@ -1100,7 +1100,7 @@ public:
 
     int64 GetBlockTrust() const
     {
-        return (nChainTrust - pprev->nChainTrust);
+        return (nChainTrust - (pprev? pprev->nChainTrust : 0));
     }
 
     bool IsInMainChain() const