diff --git a/libi2pd/Transports.cpp b/libi2pd/Transports.cpp index b531bf71..f375296f 100644 --- a/libi2pd/Transports.cpp +++ b/libi2pd/Transports.cpp @@ -102,9 +102,14 @@ namespace transport void DHKeysPairSupplier::Return (std::shared_ptr pair) { - std::unique_lockl(m_AcquiredMutex); - if ((int)m_Queue.size () < 2*m_QueueSize) - m_Queue.push (pair); + if (pair) + { + std::unique_lockl(m_AcquiredMutex); + if ((int)m_Queue.size () < 2*m_QueueSize) + m_Queue.push (pair); + } + else + LogPrint(eLogError, "Transports: return null DHKeys"); } Transports transports;