Skip to content

Commit 8018a92

Browse files
committed
fix: handle possible nullptr in InitNewQuorum
1 parent 11f2e4f commit 8018a92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llmq/dkgsessionhandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ void CDKGSessionHandler::HandleDKGRound(CConnman& connman, PeerManager& peerman)
539539

540540
const CBlockIndex* pQuorumBaseBlockIndex = WITH_LOCK(::cs_main, return m_chainstate.m_blockman.LookupBlockIndex(curQuorumHash));
541541

542-
if (!InitNewQuorum(pQuorumBaseBlockIndex)) {
542+
if (!pQuorumBaseBlockIndex || !InitNewQuorum(pQuorumBaseBlockIndex)) {
543543
// should actually never happen
544544
WaitForNewQuorum(curQuorumHash);
545545
throw AbortPhaseException();

0 commit comments

Comments
 (0)