Add check for point if null

This commit is contained in:
PavelRatushny 2017-06-08 15:48:09 +03:00
parent 27ca6f24d4
commit a6520c3f3f

View file

@ -304,7 +304,9 @@ public class TrackDetailsMenu {
float[] entries = chart.getXAxis().mEntries;
for (int i = 0; i < entries.length; i++) {
WptPt pointToAdd = getPoint(chart, entries[i]);
pointsOnChart.add(pointToAdd);
if (pointToAdd != null) {
pointsOnChart.add(pointToAdd);
}
}
mapActivity.getMapLayers().getGpxLayer().setPointsOnChart(pointsOnChart);
}