diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java index 88de874cfe..25f9350007 100644 --- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java +++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java @@ -493,7 +493,9 @@ public class GPXDatabase { a.avgSpeed = avgSpeed; a.points = points; a.wptPoints = wptPoints; - a.wptCategoryNames = Algorithms.decodeStringSet(wptCategoryNames); + if (wptCategoryNames != null) { + a.wptCategoryNames = Algorithms.decodeStringSet(wptCategoryNames); + } File dir; if (!Algorithms.isEmpty(fileDir)) { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java index 7f84546256..639f243c10 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/AddTracksGroupBottomSheetDialogFragment.java @@ -126,8 +126,7 @@ public class AddTracksGroupBottomSheetDialogFragment extends AddGroupBottomSheet GpxDataItem item = processedDataFiles.get(gpxFile); if (item == null || item.getFileLastModifiedTime() != gpxFile.lastModified() - || item.getAnalysis().wptCategoryNames == null - || (item.getAnalysis().wptPoints > 0 && item.getAnalysis().wptCategoryNames.isEmpty())) { + || item.getAnalysis().wptCategoryNames == null) { GPXFile f = GPXUtilities.loadGPXFile(app, gpxFile); GPXTrackAnalysis analysis = f.getAnalysis(gpxFile.lastModified()); if (item == null) {