mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Check for possible null ranks
This commit is contained in:
@ -23,7 +23,7 @@ namespace osu.Game.Users
|
||||
public decimal? PP;
|
||||
|
||||
[JsonProperty(@"pp_rank")]
|
||||
public int Rank { get => Ranks.GlobalRank; set => Ranks.GlobalRank = value; }
|
||||
public int Rank { get => Ranks.GlobalRank ?? 0; set => Ranks.GlobalRank = value; }
|
||||
|
||||
[JsonProperty(@"rank")]
|
||||
public UserRank Ranks;
|
||||
@ -31,10 +31,10 @@ namespace osu.Game.Users
|
||||
public struct UserRank
|
||||
{
|
||||
[JsonProperty(@"global")]
|
||||
public int GlobalRank;
|
||||
public int? GlobalRank;
|
||||
|
||||
[JsonProperty(@"country")]
|
||||
public int CountryRank;
|
||||
public int? CountryRank;
|
||||
}
|
||||
|
||||
[JsonProperty(@"ranked_score")]
|
||||
|
Reference in New Issue
Block a user