From 09bec79b473fad40268f7b25b92c4979563829c4 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 4 Mar 2014 04:14:17 -0500 Subject: Fix 2 crashes from removing the permanent channel mode from channels which do not exist --- modules/commands/cs_mode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/commands/cs_mode.cpp') diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index db5eecbb3..a13610d23 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -902,9 +902,9 @@ class CSMode : public Module } } - void OnCheckModes(Channel *c) anope_override + void OnCheckModes(Reference &c) anope_override { - if (!c->ci) + if (!c || !c->ci) return; ModeLocks *locks = modelocks.Get(c->ci); -- cgit