mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 00:02:54 +08:00
Fix null handling when no items are populated but a selection is made
This commit is contained in:
parent
9c34819ff4
commit
6a18d18feb
@ -124,8 +124,9 @@ namespace osu.Game.Screens.SelectV2
|
|||||||
if (Criteria.SplitOutDifficulties)
|
if (Criteria.SplitOutDifficulties)
|
||||||
{
|
{
|
||||||
// Find the containing group. There should never be too many groups so iterating is efficient enough.
|
// Find the containing group. There should never be too many groups so iterating is efficient enough.
|
||||||
GroupDefinition group = grouping.GroupItems.Single(kvp => kvp.Value.Any(i => ReferenceEquals(i.Model, beatmapInfo))).Key;
|
GroupDefinition? group = grouping.GroupItems.SingleOrDefault(kvp => kvp.Value.Any(i => ReferenceEquals(i.Model, beatmapInfo))).Key;
|
||||||
|
|
||||||
|
if (group != null)
|
||||||
setVisibleGroup(group);
|
setVisibleGroup(group);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user