Skip to content

NullReferenceException if UseShardEnvConfig is false #267

@w-biggs

Description

@w-biggs

Describe the bug:
Setting up fmbot from scratch locally, the config.json is generated with "UseShardEnvConfig": false, and therefore, ConfigData.Data.Shards remains null. However, TimerService.cs checks ConfigData.Data.Shards.MainInstance, which causes a NullReferenceException.

Solution is probably to do optional chaining - ConfigData.Data.Shards?.MainInstance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions