1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 10:35:50 +01:00

Check ActivityListing charts for null condition, should fix #2322

This commit is contained in:
vanous 2021-06-27 14:37:57 +02:00
parent 24afee2de5
commit ad7fc6c5d0

View File

@ -138,6 +138,14 @@ public class ActivityListingChartFragment extends AbstractChartFragment {
@Override
protected void updateChartsnUIThread(ChartsData chartsData) {
MyChartsData mcd = (MyChartsData) chartsData;
if (mcd == null) {
return;
}
if (mcd.getStepSessions() == null) {
return;
}
if (mcd.getStepSessions().toArray().length == 0) {
getChartsHost().enableSwipeRefresh(true); //enable pull to refresh, might be needed
} else {