diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java index 4b7a1dfaf3..aa263aa154 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java @@ -36,6 +36,7 @@ import net.osmand.plus.myplaces.AvailableGPXFragment; import net.osmand.plus.myplaces.AvailableGPXFragment.GpxInfo; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.widgets.OsmandTextFieldBoxes; +import net.osmand.util.Algorithms; import java.io.File; import java.util.ArrayList; @@ -171,6 +172,10 @@ public class OnSaveCurrentTrackFragment extends BottomSheetDialogFragment { if (savedGpxName.equalsIgnoreCase(newGpxName)) { return savedFile; } + if (Algorithms.isEmpty(newGpxName)) { + Toast.makeText(app, R.string.empty_filename, Toast.LENGTH_LONG).show(); + return null; + } return LocalIndexesFragment.renameGpxFile(app, savedFile, newGpxName + ".gpx", null); }