1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 11:33:19 +02:00

Fix crash with mpandroidchart 3.0pre (master)

This commit is contained in:
cpfeiffer 2016-10-04 23:39:14 +02:00
parent 478782998e
commit e5d178b315

View File

@ -735,10 +735,10 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
@Override
public String getFormattedValue(float value, AxisBase axis) {
if (xLabels == null) {
int index = (int) value;
if (xLabels == null || index >= xLabels.size()) {
return String.valueOf(value);
}
int index = (int) value;
return xLabels.get(index);
}