From 1fb91bc7a7e6f30ebc3cd6ccc8b3be880ee10c78 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Sun, 9 Aug 2020 22:25:14 +0300 Subject: [PATCH] StatsFragment crash fix --- .../thmmy/mthmmy/activities/profile/stats/StatsFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java index 2fce1ea9..aee0401e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java @@ -358,7 +358,10 @@ public class StatsFragment extends Fragment { @Override public String getFormattedValue(float value, AxisBase axis) { - return mValues.get((int) value); + if (((int) value) < mValues.size()) + return mValues.get((int) value); + else + return "0"; } } }