aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2019-03-08 15:48:41 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2019-09-04 14:58:34 -0400
commite75c39cd425f8c4e5b6bbb2beecb9c80034fefe1 (patch)
tree697bd41fb179ec55aaea1ef76f015ade8ac33169 /src/net.h
parentc4aa2ba82211ea5988ed7fe21e1b08bc3367e6d4 (diff)
Check that tx_relay is initialized before access
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index d12fc3ae9a..218dd67ba6 100644
--- a/src/net.h
+++ b/src/net.h
@@ -848,7 +848,7 @@ public:
void AddInventoryKnown(const CInv& inv)
{
- {
+ if (m_tx_relay != nullptr) {
LOCK(m_tx_relay->cs_tx_inventory);
m_tx_relay->filterInventoryKnown.insert(inv.hash);
}
@@ -856,7 +856,7 @@ public:
void PushInventory(const CInv& inv)
{
- if (inv.type == MSG_TX) {
+ if (inv.type == MSG_TX && m_tx_relay != nullptr) {
LOCK(m_tx_relay->cs_tx_inventory);
if (!m_tx_relay->filterInventoryKnown.contains(inv.hash)) {
m_tx_relay->setInventoryTxToSend.insert(inv.hash);