Merge pull request #4246 from osmandapp/fix_npe

Fix exception
This commit is contained in:
Alexey 2017-07-31 13:26:39 +03:00 committed by GitHub
commit b2662ed3cc

View file

@ -236,7 +236,11 @@ public class TrackSegmentFragment extends OsmAndListFragment {
}
private GPXFile getGpx() {
return getTrackActivity().getGpx();
TrackActivity activity = getTrackActivity();
if (activity == null) {
return null;
}
return activity.getGpx();
}
private GpxDataItem getGpxDataItem() {