From 43702610553c0121869025b4f8f819e0932e73e7 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Tue, 27 Apr 2021 16:02:33 +0300 Subject: [PATCH] Avoid crash on non-compiled room regex Roughly fixes #1845 (actual compiling still needed) Signed-off-by: Bohdan Horbeshko --- setup/config/config_appservice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/config/config_appservice.go b/setup/config/config_appservice.go index 4a14672e6..20cfc0262 100644 --- a/setup/config/config_appservice.go +++ b/setup/config/config_appservice.go @@ -101,7 +101,7 @@ func (a *ApplicationService) IsInterestedInRoomID( ) bool { if namespaceSlice, ok := a.NamespaceMap["rooms"]; ok { for _, namespace := range namespaceSlice { - if namespace.RegexpObject.MatchString(roomID) { + if namespace.RegexpObject != nil && namespace.RegexpObject.MatchString(roomID) { return true } }