Null exception fix

vue-cli
Noah 2023-09-04 13:37:21 -07:00
parent 7ffa6b4dbd
commit a7342988ba
1 changed files with 4 additions and 0 deletions

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).
func (s *Subscriber) Blocks(other *Subscriber) bool {
if s == nil || other == nil {
return false
}
s.muteMu.RLock()
defer s.muteMu.RUnlock()