summaryrefslogtreecommitdiff
path: root/src/modes.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-26 15:24:19 -0400
committerAdam <Adam@anope.org>2014-04-26 15:24:19 -0400
commit4eb0a3bdb73874aa87095f566677166764ef1ccc (patch)
treef23a6763fd86598f8b76ac4e8d77e2823ce6c0bf /src/modes.cpp
parent6a03eb69ebbe773f1d4139ff88d74ecdb2b0af4b (diff)
Fix ModeManager::RebuildStatusModes, not all modes are in GetChannelModes() at the time this is called
Diffstat (limited to 'src/modes.cpp')
-rw-r--r--src/modes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modes.cpp b/src/modes.cpp
index 891dcf6a8..668f7c150 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -587,11 +587,11 @@ static struct StatusSort
void ModeManager::RebuildStatusModes()
{
ChannelModesByStatus.clear();
- for (unsigned j = 0; j < ModeManager::GetChannelModes().size(); ++j)
+ for (unsigned j = 0; j < ChannelModesIdx.size(); ++j)
{
- ChannelMode *cm = ModeManager::GetChannelModes()[j];
+ ChannelMode *cm = ChannelModesIdx[j];
- if (cm->type == MODE_STATUS && std::find(ChannelModesByStatus.begin(), ChannelModesByStatus.end(), cm) == ChannelModesByStatus.end())
+ if (cm && cm->type == MODE_STATUS && std::find(ChannelModesByStatus.begin(), ChannelModesByStatus.end(), cm) == ChannelModesByStatus.end())
ChannelModesByStatus.push_back(anope_dynamic_static_cast<ChannelModeStatus *>(cm));
}
std::sort(ChannelModesByStatus.begin(), ChannelModesByStatus.end(), statuscmp);