mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 08:12:56 +08:00
Guard against potential null CurrentItem
in ParticipantPanel
This commit is contained in:
parent
e889d93441
commit
2d58feebb1
@ -189,7 +189,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
||||
var currentItem = Playlist.GetCurrentItem();
|
||||
Debug.Assert(currentItem != null);
|
||||
|
||||
var ruleset = rulesets.GetRuleset(currentItem.RulesetID)?.CreateInstance();
|
||||
var ruleset = currentItem != null ? rulesets.GetRuleset(currentItem.RulesetID)?.CreateInstance() : null;
|
||||
|
||||
int? currentModeRank = ruleset != null ? User.User?.RulesetsStatistics?.GetValueOrDefault(ruleset.ShortName)?.GlobalRank : null;
|
||||
userRankText.Text = currentModeRank != null ? $"#{currentModeRank.Value:N0}" : string.Empty;
|
||||
|
Loading…
Reference in New Issue
Block a user