1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Use ElementAtOrDefault

This commit is contained in:
Dean Herbert 2020-02-01 01:19:04 +09:00
parent 0c305b96d1
commit e728d2be17

View File

@ -323,8 +323,7 @@ namespace osu.Game.Overlays
{
var channel = ChannelTabControl.Items
.Where(tab => !(tab is ChannelSelectorTabItem.ChannelSelectorTabChannel))
.Skip(index)
.FirstOrDefault();
.ElementAtOrDefault(index);
if (channel != null)
ChannelTabControl.Current.Value = channel;
}