summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-05-28 01:28:36 +0200
committerattilamolnar <attilamolnar@hush.com>2012-05-28 01:28:36 +0200
commitcf4b99e9c6cdd5675fb7b36870fecf83edffa7af (patch)
tree798bc98b2f9c666b7569f9d5cf2e820131a3fe8a /src
parenta441c1b1be087a9974dad211aa3706e1909d6ab3 (diff)
m_showwhois Fix potential crash in WHOISNOTICE handler
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_showwhois.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 691887429..6eec64bd5 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -76,6 +76,9 @@ class WhoisNoticeCmd : public Command
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
{
User* dest = ServerInstance->FindNick(parameters[0]);
+ if (!dest)
+ return CMD_FAILURE;
+
User* source = ServerInstance->FindNick(parameters[1]);
if (IS_LOCAL(dest) && source)