From 4b6f7d789333dd9fd3b08f8742a68c0f9c6c2254 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 16 Jan 2015 11:01:50 +0100 Subject: Verify that the chan in chanlist is in fact the same object as us in Channel::CheckDestroy() before proceeding --- src/channels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index 02a6ae30b..948538ff4 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -88,7 +88,7 @@ void Channel::CheckDestroy() // If the channel isn't in chanlist then it is already in the cull list, don't add it again chan_hash::iterator iter = ServerInstance->chanlist.find(this->name); - if (iter == ServerInstance->chanlist.end()) + if ((iter == ServerInstance->chanlist.end()) || (iter->second != this)) return; FOREACH_MOD(OnChannelDelete, (this)); -- cgit v1.3.1-10-gc9f91