From 01267a34b94a4253731a2e148e7a2d0450316869 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 17 Mar 2021 13:58:04 +0000 Subject: [PATCH] Fix nil pointer crash in QueryMembershipsForRoom --- roomserver/internal/query/query.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roomserver/internal/query/query.go b/roomserver/internal/query/query.go index f69f67f7..408f9766 100644 --- a/roomserver/internal/query/query.go +++ b/roomserver/internal/query/query.go @@ -241,6 +241,9 @@ func (r *Queryer) QueryMembershipsForRoom( if err != nil { return err } + if info == nil { + return nil + } // If no sender is specified then we will just return the entire // set of memberships for the room, regardless of whether a specific