]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanprotect.cpp
Fix segfault in m_chanprotect when OnAccessCheck is called with a null channel
[user/henk/code/inspircd.git] / src / modules / m_chanprotect.cpp
index e2c71673d0f9013e146c2ad1ad97ef611710a0a1..bc52a53a18ebbc9ca07d9872cdb7e9330588954b 100644 (file)
@@ -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);