diff options
author | Peter Powell <petpow@saberuk.com> | 2018-12-12 13:51:26 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-12-12 14:43:55 +0000 |
commit | 51891f10f2a05e16e45651a669db6680a433bf9b (patch) | |
tree | 795c43424f68ed0f6ea4e718f955667828d1087e /src/modules/m_spanningtree | |
parent | 372c5c94964263ba6c1f2f44079aac3aff448225 (diff) |
Fix a crash when the core_oper module is not loaded.
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/opertype.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 473cdb857..99c5ea8bc 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -33,7 +33,8 @@ CmdResult CommandOpertype::HandleRemote(RemoteUser* u, CommandBase::Params& para ServerInstance->Users->all_opers.push_back(u); ModeHandler* opermh = ServerInstance->Modes->FindMode('o', MODETYPE_USER); - u->SetMode(opermh, true); + if (opermh) + u->SetMode(opermh, true); ServerConfig::OperIndex::const_iterator iter = ServerInstance->Config->OperTypes.find(opertype); if (iter != ServerInstance->Config->OperTypes.end()) |