diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-05-28 01:28:36 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-05-28 01:28:36 +0200 |
commit | cf4b99e9c6cdd5675fb7b36870fecf83edffa7af (patch) | |
tree | 798bc98b2f9c666b7569f9d5cf2e820131a3fe8a | |
parent | a441c1b1be087a9974dad211aa3706e1909d6ab3 (diff) |
m_showwhois Fix potential crash in WHOISNOTICE handler
-rw-r--r-- | src/modules/m_showwhois.cpp | 3 |
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> ¶meters, User *user) { User* dest = ServerInstance->FindNick(parameters[0]); + if (!dest) + return CMD_FAILURE; + User* source = ServerInstance->FindNick(parameters[1]); if (IS_LOCAL(dest) && source) |