Fix NPE
This commit is contained in:
parent
114048f3c4
commit
aaf4d7ad8c
1 changed files with 32 additions and 29 deletions
|
@ -629,7 +629,9 @@ public class TrackPointFragment extends OsmandExpandableListFragment {
|
|||
|
||||
private void addMapMarkersSyncGroup() {
|
||||
MapMarkersHelper markersHelper = app.getMapMarkersHelper();
|
||||
File gpx = getGpxDataItem().getFile();
|
||||
GpxDataItem gpxDataItem = getGpxDataItem();
|
||||
if (gpxDataItem != null) {
|
||||
File gpx = gpxDataItem.getFile();
|
||||
MarkersSyncGroup syncGroup = new MarkersSyncGroup(gpx.getAbsolutePath(),
|
||||
AndroidUtils.trimExtension(gpx.getName()), MarkersSyncGroup.GPX_TYPE);
|
||||
markersHelper.addMarkersSyncGroup(syncGroup);
|
||||
|
@ -660,6 +662,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment {
|
|||
tv.setTextColor(ContextCompat.getColor(getContext(), R.color.color_dialog_buttons_dark));
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateMenuFabVisibility(boolean visible) {
|
||||
menuFab.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
|
|
Loading…
Reference in a new issue