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.
This commit is contained in:
Alexey Sokolov
2020-05-31 11:43:20 +01:00
parent 2390ad111b
commit 6cce5fe08d
+6
View File
@@ -862,6 +862,9 @@ void CClient::ClearServerDependentCaps() {
template <typename T>
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<CChan*> CClient::MatchChans(const CString& sPatterns) const {
if (!m_pNetwork) {
return {};
}
VCString vsPatterns;
sPatterns.Replace_n(",", " ")
.Split(" ", vsPatterns, false, "", "", true, true);