diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go index ae6bf0108..8fa4c0e48 100644 --- a/roomserver/storage/shared/storage.go +++ b/roomserver/storage/shared/storage.go @@ -127,7 +127,7 @@ func (d *Database) RoomInfo(ctx context.Context, roomID string) (*types.RoomInfo return &info, nil } info, err := d.RoomsTable.SelectRoomInfo(ctx, roomID) - if err == nil { + if err == nil && info != nil { d.Cache.StoreRoomInfo(roomID, *info) } return info, err