3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00
This commit is contained in:
Shivaram Lingamneni 2018-05-22 04:23:33 -04:00
parent f142bf065d
commit 0751f52f37

View File

@ -340,6 +340,10 @@ func NewModeSet() *ModeSet {
// test whether `mode` is set // test whether `mode` is set
func (set *ModeSet) HasMode(mode Mode) bool { func (set *ModeSet) HasMode(mode Mode) bool {
if set == nil {
return false
}
set.RLock() set.RLock()
defer set.RUnlock() defer set.RUnlock()
return set.modes[mode] return set.modes[mode]