Fix crashing if location is not null when opening detail view
This commit is contained in:
parent
c720eafa46
commit
d763981229
1 changed files with 7 additions and 6 deletions
|
@ -299,6 +299,13 @@ public class TrackDetailsMenu {
|
|||
Highlight[] highlights = chart.getHighlighted();
|
||||
LatLon location = null;
|
||||
|
||||
if (trackChartPoints == null) {
|
||||
trackChartPoints = new TrackChartPoints();
|
||||
int segmentColor = getTrackSegment(chart).getColor(0);
|
||||
trackChartPoints.setSegmentColor(segmentColor);
|
||||
trackChartPoints.setGpx(getGpxItem().group.getGpx());
|
||||
}
|
||||
|
||||
float minimumVisibleXValue = chart.getLowestVisibleX();
|
||||
float maximumVisibleXValue = chart.getHighestVisibleX();
|
||||
|
||||
|
@ -322,12 +329,6 @@ public class TrackDetailsMenu {
|
|||
} else {
|
||||
gpxItem.chartHighlightPos = -1;
|
||||
}
|
||||
if (trackChartPoints == null) {
|
||||
trackChartPoints = new TrackChartPoints();
|
||||
int segmentColor = getTrackSegment(chart).getColor(0);
|
||||
trackChartPoints.setSegmentColor(segmentColor);
|
||||
trackChartPoints.setGpx(getGpxItem().group.getGpx());
|
||||
}
|
||||
trackChartPoints.setXAxisPoints(getXAxisPoints(chart));
|
||||
if (gpxItem.route) {
|
||||
mapActivity.getMapLayers().getMapInfoLayer().setTrackChartPoints(trackChartPoints);
|
||||
|
|
Loading…
Reference in a new issue