summaryrefslogtreecommitdiff
path: root/src/modules/m_chanprotect.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:52:38 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:52:38 +0000
commitfe7ce903b838912a34de9e1530dd9ca45af5aed3 (patch)
treee642ceeb52c9256a885828489217737cd8289d96 /src/modules/m_chanprotect.cpp
parentfc4d8fc4cc409770c0488c7b56f1b140dcbd2397 (diff)
Fix segfault in m_chanprotect when OnAccessCheck is called with a null channel
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11655 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r--src/modules/m_chanprotect.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index e2c71673d..bc52a53a1 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -408,6 +408,9 @@ class ModuleChanProtect : public Module
if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server))
return MOD_RES_ALLOW;
+ if (!channel)
+ return MOD_RES_PASSTHRU;
+
std::string founder("cm_founder_"+channel->name);
std::string protect("cm_protect_"+channel->name);