Null exception fix
This commit is contained in:
parent
7ffa6b4dbd
commit
a7342988ba
|
@ -495,6 +495,10 @@ func (s *Subscriber) Mutes(username string) bool {
|
|||
|
||||
// Blocks checks whether the subscriber blocks the username, or vice versa (blocking goes both directions).
|
||||
func (s *Subscriber) Blocks(other *Subscriber) bool {
|
||||
if s == nil || other == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
s.muteMu.RLock()
|
||||
defer s.muteMu.RUnlock()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user