1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Add missing null checks

This commit is contained in:
Dean Herbert 2021-10-05 17:59:38 +09:00
parent b41fa41c85
commit 2be44188ef

View File

@ -143,6 +143,9 @@ namespace osu.Game.Overlays
switch (request)
{
case GetUserRankingsRequest userRequest:
if (userRequest.Response == null)
return null;
switch (userRequest.Type)
{
case UserRankingsType.Performance:
@ -155,7 +158,12 @@ namespace osu.Game.Overlays
return null;
case GetCountryRankingsRequest countryRequest:
{
if (countryRequest.Response == null)
return null;
return new CountriesTable(1, countryRequest.Response.Countries);
}
}
return null;