diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java index 367275920e..a036914150 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java @@ -352,16 +352,14 @@ public class GpxImportHelper { private List asFavourites(final List wptPts) { final List favourites = new ArrayList<>(); - for (GPXUtilities.WptPt p : wptPts) { - if (p.category != null) { - final FavouritePoint fp = new FavouritePoint(p.lat, p.lon, p.name, p.category); + if (p.name != null) { + final string fpCat = (p.category != null) ? p.category : ""; + final FavouritePoint fp = new FavouritePoint(p.lat, p.lon, p.name, fpCat); if (p.desc != null) { fp.setDescription(p.desc); } favourites.add(fp); - } else if (p.name != null) { - favourites.add(new FavouritePoint(p.lat, p.lon, p.name, "")); } }