]> Git Repo - VerusCoin.git/commitdiff
Fix potential seg fault if mapBlockIndex is being updated during search
authormiketout <[email protected]>
Tue, 19 May 2020 20:14:39 +0000 (13:14 -0700)
committermiketout <[email protected]>
Tue, 19 May 2020 20:14:39 +0000 (13:14 -0700)
src/pbaas/identity.cpp

index adf76cfaed66b171889ee266f91f95fd2398aba6..93f25e46738cc60739deb7a4b75c260a6409f28a 100644 (file)
@@ -724,7 +724,7 @@ bool PrecheckIdentityReservation(const CTransaction &tx, int32_t outNum, CValida
             txMap[oneTxIn.prevout.hash] = sourceTx;
 
             auto blockIt = mapBlockIndex.find(hashBlk);
-            if (blockIt != mapBlockIndex.end())
+            if (blockIt != mapBlockIndex.end() && blockIt->second)
             {
                 commitmentHeight = blockIt->second->GetHeight();
             }
This page took 0.026962 seconds and 4 git commands to generate.