diff --git a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java index 762ed0deb8..b3c3e18e8a 100644 --- a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java +++ b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java @@ -1605,11 +1605,10 @@ public class GPXUtilities { } public boolean isShowStartFinish() { - String showStartFinish = null; - if (extensions != null) { - showStartFinish = extensions.get("show_start_finish"); + if (extensions != null && extensions.containsKey("show_start_finish")) { + return Boolean.parseBoolean(extensions.get("show_start_finish")); } - return Boolean.parseBoolean(showStartFinish); + return true; } public void setShowStartFinish(boolean showStartFinish) { diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java index dd573eba54..16f480df10 100644 --- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java +++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java @@ -443,7 +443,7 @@ public class GPXDatabase { db.execSQL("UPDATE " + GPX_TABLE_NAME + " SET " + GPX_COL_SHOW_ARROWS + " = ? " + "WHERE " + GPX_COL_SHOW_ARROWS + " IS NULL", new Object[]{0}); db.execSQL("UPDATE " + GPX_TABLE_NAME + " SET " + GPX_COL_SHOW_START_FINISH + " = ? " + - "WHERE " + GPX_COL_SHOW_START_FINISH + " IS NULL", new Object[]{0}); + "WHERE " + GPX_COL_SHOW_START_FINISH + " IS NULL", new Object[]{1}); } db.execSQL("CREATE INDEX IF NOT EXISTS " + GPX_INDEX_NAME_DIR + " ON " + GPX_TABLE_NAME + " (" + GPX_COL_NAME + ", " + GPX_COL_DIR + ");"); }