mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Add missing null checks
This commit is contained in:
parent
b41fa41c85
commit
2be44188ef
@ -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,8 +158,13 @@ namespace osu.Game.Overlays
|
||||
return null;
|
||||
|
||||
case GetCountryRankingsRequest countryRequest:
|
||||
{
|
||||
if (countryRequest.Response == null)
|
||||
return null;
|
||||
|
||||
return new CountriesTable(1, countryRequest.Response.Countries);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user