From f426348a43226829e711bc18aba0e263e50b04b1 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Mon, 2 Oct 2017 13:00:15 +0300 Subject: [PATCH] Fix #4478 --- OsmAnd/src/net/osmand/plus/GPXUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/GPXUtilities.java b/OsmAnd/src/net/osmand/plus/GPXUtilities.java index c11d56b723..87f13d56fe 100644 --- a/OsmAnd/src/net/osmand/plus/GPXUtilities.java +++ b/OsmAnd/src/net/osmand/plus/GPXUtilities.java @@ -1012,7 +1012,6 @@ public class GPXUtilities { } private void removeGeneralTrackIfExists() { - Track generalTrack = getGeneralTrack(); if (generalTrack != null) { tracks.remove(generalTrack); this.generalTrack = null; @@ -1163,6 +1162,7 @@ public class GPXUtilities { } public static String writeGpxFile(File fout, GPXFile file, OsmandApplication ctx) { + file.removeGeneralTrackIfExists(); Writer output = null; try { output = new OutputStreamWriter(new FileOutputStream(fout), "UTF-8"); //$NON-NLS-1$