1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00

Add more consistency to data null checks

This commit is contained in:
Andrei Zavatski 2020-03-10 00:19:28 +03:00
parent d6adc06f6e
commit f6461dc5f8

View File

@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Profile
private void redrawGraph() private void redrawGraph()
{ {
if (!data?.Any() ?? true) if (!(data?.Length > 1))
{ {
HideGraph(); HideGraph();
return; return;
@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Profile
{ {
get get
{ {
if (!data?.Any() ?? true) if (!(data?.Length > 1))
return null; return null;
var (key, value) = data[dataIndex]; var (key, value) = data[dataIndex];