mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-14 05:59:26 +01:00
Check ActivityListing charts for null condition, should fix #2322
This commit is contained in:
parent
24afee2de5
commit
ad7fc6c5d0
@ -138,6 +138,14 @@ public class ActivityListingChartFragment extends AbstractChartFragment {
|
|||||||
@Override
|
@Override
|
||||||
protected void updateChartsnUIThread(ChartsData chartsData) {
|
protected void updateChartsnUIThread(ChartsData chartsData) {
|
||||||
MyChartsData mcd = (MyChartsData) chartsData;
|
MyChartsData mcd = (MyChartsData) chartsData;
|
||||||
|
|
||||||
|
if (mcd == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mcd.getStepSessions() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mcd.getStepSessions().toArray().length == 0) {
|
if (mcd.getStepSessions().toArray().length == 0) {
|
||||||
getChartsHost().enableSwipeRefresh(true); //enable pull to refresh, might be needed
|
getChartsHost().enableSwipeRefresh(true); //enable pull to refresh, might be needed
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user