0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

Avoid accessing nullpointer in BaseIndex::GetSummary()

This commit is contained in:
Jonas Schnelli 2020-12-10 13:36:47 +01:00
parent 6abe9f5b11
commit 00d57ff768

View file

@ -366,6 +366,6 @@ IndexSummary BaseIndex::GetSummary() const
IndexSummary summary{};
summary.name = GetName();
summary.synced = m_synced;
summary.best_block_height = m_best_block_index.load()->nHeight;
summary.best_block_height = m_best_block_index ? m_best_block_index.load()->nHeight : 0;
return summary;
}