From f6461dc5f8381d3f62523e155f6f5e7646abb788 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Tue, 10 Mar 2020 00:19:28 +0300 Subject: [PATCH] Add more consistency to data null checks --- osu.Game/Overlays/Profile/UserGraph.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Profile/UserGraph.cs b/osu.Game/Overlays/Profile/UserGraph.cs index 07346a3e45..cea4600523 100644 --- a/osu.Game/Overlays/Profile/UserGraph.cs +++ b/osu.Game/Overlays/Profile/UserGraph.cs @@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Profile private void redrawGraph() { - if (!data?.Any() ?? true) + if (!(data?.Length > 1)) { HideGraph(); return; @@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Profile { get { - if (!data?.Any() ?? true) + if (!(data?.Length > 1)) return null; var (key, value) = data[dataIndex];