mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
fix #268
This commit is contained in:
parent
f142bf065d
commit
0751f52f37
@ -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]
|
||||||
|
Loading…
Reference in New Issue
Block a user