1
0
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:
Salman Ahmed 2022-07-16 06:02:04 +03:00
parent 08f1280aa8
commit 9c81241f4c

View File

@ -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;