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