1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Add missing entries to switch statement and guard against out of range

This commit is contained in:
Dean Herbert 2022-01-30 02:58:53 +09:00
parent d21464ea61
commit 9b573fbc2b

View File

@ -278,10 +278,18 @@ namespace osu.Game.Online.Leaderboards
replacePlaceholder(new MessagePlaceholder(@"Please invest in an osu!supporter tag to view this leaderboard!"));
break;
default:
case PlaceholderState.Retrieving:
Debug.Assert(scores?.Any() != true);
replacePlaceholder(null);
break;
case PlaceholderState.Successful:
Debug.Assert(scores?.Any() == true);
replacePlaceholder(null);
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}