From fe7ce903b838912a34de9e1530dd9ca45af5aed3 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:52:38 +0000 Subject: 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 --- src/modules/m_chanprotect.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.3