From de19bf751523d8c78701accc110eae5538cffca4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Aug 2022 17:24:47 +0300 Subject: fixes #3145 (IRC: crash on channels list request) --- protocols/IRCG/src/irclib.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols/IRCG') diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index b36e1b37e7..6cf422882d 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -388,7 +388,8 @@ void CIrcProto::DoReceive() ptrW ptszMsg; if (codepage != CP_UTF8 && m_utfAutodetect && Utf8CheckString(pStart)) ptszMsg = mir_utf8decodeW(pStart); - else + + if (ptszMsg == nullptr) ptszMsg = mir_a2u_cp(pStart, codepage); CIrcMessage msg(this, ptszMsg, codepage, true); -- cgit v1.2.3