diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2020-12-10 13:36:47 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2021-02-11 11:39:45 +0100 |
commit | 00d57ff76854938ead800767fb673a8af46eac8e (patch) | |
tree | 433c852ae405cdf0d2c046d2d7044a418c1f605d | |
parent | 6abe9f5b11cd4a5ecb6caca8443fe2950a417842 (diff) |
Avoid accessing nullpointer in BaseIndex::GetSummary()
-rw-r--r-- | src/index/base.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index/base.cpp b/src/index/base.cpp index 38958a82e9..25644c3b41 100644 --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -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; } |