mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Add null check to resolve inspection
This commit is contained in:
parent
16fd7f5a28
commit
53a6ef22ce
@ -187,7 +187,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
||||
// Todo: Should use the room's selected item to determine ruleset.
|
||||
var ruleset = rulesets.GetRuleset(0)?.CreateInstance();
|
||||
|
||||
int? currentModeRank = User.User?.RulesetsStatistics?.GetValueOrDefault(ruleset.ShortName)?.GlobalRank;
|
||||
int? currentModeRank = ruleset != null ? User.User?.RulesetsStatistics?.GetValueOrDefault(ruleset.ShortName)?.GlobalRank : null;
|
||||
userRankText.Text = currentModeRank != null ? $"#{currentModeRank.Value:N0}" : string.Empty;
|
||||
|
||||
userStateDisplay.UpdateStatus(User.State, User.BeatmapAvailability);
|
||||
|
Loading…
Reference in New Issue
Block a user