From fd8570454e4d71e541040623ee2a1e39edbeadc7 Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 5 Aug 2007 19:43:25 +0000 Subject: [PATCH] This fixes sf.net bug 1765573 which is a NULL pointer dereference. Patch was written/tested by x-x and I did the indentation. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@817 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Client.cpp b/Client.cpp index 31781cde..f18fd887 100644 --- a/Client.cpp +++ b/Client.cpp @@ -69,6 +69,11 @@ void CClient::ReadLine(const CString& sData) { return; // Don't forward this msg. ZNC will handle nick changes until auth is complete } + if (!m_pIRCSock) { + // No need to check against IRC nick or to forward it + return; + } + if ((m_pUser) && (sNick.CaseCmp(m_pUser->GetNick()) == 0)) { m_uKeepNickCounter++; // If the user is changing his nick to the conifg nick, set keepnick to the config value