mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Don't crash on unexpected pairing links
This commit is contained in:
parent
604cb4cb9e
commit
54b87e9c93
@ -104,7 +104,10 @@ namespace osu.Game.Tournament
|
||||
// link pairings to groupings
|
||||
foreach (var group in Ladder.Groupings)
|
||||
foreach (var id in group.Pairings)
|
||||
Ladder.Pairings.Single(p => p.ID == id).Grouping.Value = group;
|
||||
{
|
||||
var found = Ladder.Pairings.FirstOrDefault(p => p.ID == id);
|
||||
if (found != null) found.Grouping.Value = group;
|
||||
}
|
||||
|
||||
Ladder.CurrentMatch.Value = Ladder.Pairings.FirstOrDefault(p => p.Current.Value);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user