mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fix potential nullref on APIUser.Country
We need NRT sooner than later...
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user