Null exception fix

This commit is contained in:
Noah 2023-09-04 13:37:21 -07:00
parent 7ffa6b4dbd
commit a7342988ba

View File

@ -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). // Blocks checks whether the subscriber blocks the username, or vice versa (blocking goes both directions).
func (s *Subscriber) Blocks(other *Subscriber) bool { func (s *Subscriber) Blocks(other *Subscriber) bool {
if s == nil || other == nil {
return false
}
s.muteMu.RLock() s.muteMu.RLock()
defer s.muteMu.RUnlock() defer s.muteMu.RUnlock()