Better handle startup when ladder cannot be read correctly

This commit is contained in:
Dean Herbert 2020-03-03 18:09:25 +09:00
parent 08756186e9
commit a2273234cb
1 changed files with 2 additions and 3 deletions

View File

@ -121,10 +121,9 @@ private void readBracket()
using (var sr = new StreamReader(stream))
ladder = JsonConvert.DeserializeObject<LadderInfo>(sr.ReadToEnd());
}
else
{
if (ladder == null)
ladder = new LadderInfo();
}
if (ladder.Ruleset.Value == null)
ladder.Ruleset.Value = RulesetStore.AvailableRulesets.First();