diff --git a/src/main.cpp b/src/main.cpp index 2c3d860e9..c07bd1df4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2942,12 +2942,12 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo CBlockIndex *pindex = chainActive.Tip(); if(pindex != NULL){ if(pindex->GetBlockHash() == block.hashPrevBlock){ - int64_t masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, block.vtx[0].GetValueOut()); bool fIsInitialDownload = IsInitialBlockDownload(); // If we don't already have its previous block, skip masternode payment step - if (!fIsInitialDownload && pindex != NULL) + if (!fIsInitialDownload) { + int64_t masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, block.vtx[0].GetValueOut()); bool foundPaymentAmount = false; bool foundPayee = false; bool foundPaymentAndPayee = false;