From a7342988bac184b8e951d70d26e2335ee4f1bd24 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Mon, 4 Sep 2023 13:37:21 -0700 Subject: [PATCH] Null exception fix --- pkg/websocket.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/websocket.go b/pkg/websocket.go index aa03dbc..59f909a 100644 --- a/pkg/websocket.go +++ b/pkg/websocket.go @@ -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()