diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/users.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h index 28b370725..ef19adb5d 100644 --- a/include/users.h +++ b/include/users.h @@ -932,5 +932,6 @@ inline bool User::IsModeSet(UserModeReference& moderef) const inline void User::SetMode(ModeHandler* mh, bool value) { - modes[mh->GetId()] = value; + if (mh && mh->GetId() != ModeParser::MODEID_MAX) + modes[mh->GetId()] = value; } |