summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;