From 2be44188efbd6befbd4a39242a9f823509d7e35c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 5 Oct 2021 17:59:38 +0900 Subject: [PATCH] Add missing null checks --- osu.Game/Overlays/RankingsOverlay.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osu.Game/Overlays/RankingsOverlay.cs b/osu.Game/Overlays/RankingsOverlay.cs index 2263d54d7b..80ce2e038d 100644 --- a/osu.Game/Overlays/RankingsOverlay.cs +++ b/osu.Game/Overlays/RankingsOverlay.cs @@ -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;