mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:02:53 +08:00
Fix potential nullref on APIUser.Country
We need NRT sooner than later...
This commit is contained in:
parent
08f1280aa8
commit
9c81241f4c
@ -38,11 +38,12 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
|
||||
public Country Country
|
||||
{
|
||||
get => country ??= (Enum.TryParse(userCountry.Code, out Country result) ? result : default);
|
||||
get => country ??= (Enum.TryParse(userCountry?.Code, out Country result) ? result : default);
|
||||
set => country = value;
|
||||
}
|
||||
|
||||
#pragma warning disable 649
|
||||
[CanBeNull]
|
||||
[JsonProperty(@"country")]
|
||||
private UserCountry userCountry;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user