From b3fd8bd0aefae8756e4720dce334c8dfdd3b68f5 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 4 Nov 2018 18:51:25 -0500 Subject: [PATCH] check if keys are available before sending termination message --- libi2pd/NTCP2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libi2pd/NTCP2.cpp b/libi2pd/NTCP2.cpp index 9114d426..8caafd2f 100644 --- a/libi2pd/NTCP2.cpp +++ b/libi2pd/NTCP2.cpp @@ -1008,6 +1008,7 @@ namespace transport void NTCP2Session::SendTermination (NTCP2TerminationReason reason) { + if (!m_SendKey || !m_SendSipKey) return; uint8_t payload[12] = { eNTCP2BlkTermination, 0, 9 }; htobe64buf (payload + 3, m_ReceiveSequenceNumber); payload[11] = (uint8_t)reason;