From e75c39cd425f8c4e5b6bbb2beecb9c80034fefe1 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 8 Mar 2019 15:48:41 -0500 Subject: Check that tx_relay is initialized before access --- src/net.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/net.h') 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); -- cgit v1.2.3