From 6cce5fe08d6eb73cca6a7b6beb29af2c60c1a729 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 31 May 2020 11:43:20 +0100 Subject: [PATCH] Check for m_pNetwork being not null in several more places I don't know whether these are crasheable, but now they will definitely be not. --- src/Client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Client.cpp b/src/Client.cpp index fb39b3fa..13048775 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -862,6 +862,9 @@ void CClient::ClearServerDependentCaps() { template void CClient::AddBuffer(const T& Message) { + if (!m_pNetwork) { + return; + } const CString sTarget = Message.GetTarget(); T Format; @@ -898,6 +901,9 @@ void CClient::EchoMessage(const CMessage& Message) { } set CClient::MatchChans(const CString& sPatterns) const { + if (!m_pNetwork) { + return {}; + } VCString vsPatterns; sPatterns.Replace_n(",", " ") .Split(" ", vsPatterns, false, "", "", true, true);