summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-04 16:26:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-04 16:26:40 +0000
commitd8e36d0cf116a3d2b87719c601d1057f7452e38b (patch)
treeda5070e78ec26e2024d791352dd6adbb44ee4c04
parent6f653ddc347d3fc212d2795bdb83d6d74ef555a2 (diff)
Extra safety checking in ModeSet just to ensure we cant be passed a null pointer
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5411 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/mode.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index b32f31dde..54349b51d 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -729,6 +729,9 @@ std::string ModeParser::ModeString(userrec* user, chanrec* channel)
std::string types;
std::string pars;
+ if (!channel || !user)
+ return "";
+
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
unsigned char pos = (mode-65) | MASK_CHANNEL;