Fix crashes

Conflicts:
	OsmAnd/src/net/osmand/plus/AppInitializer.java
This commit is contained in:
Victor Shcherb 2018-05-28 22:12:20 +02:00
parent 68af3483d2
commit 559a715236
2 changed files with 4 additions and 1 deletions

View file

@ -352,6 +352,7 @@ public class AppInitializer implements IProgress {
return app.getString(in); return app.getString(in);
} }
} catch (Exception e) { } catch (Exception e) {
LOG.info("No translation: " + keyName);
} }
return null; return null;
} }

View file

@ -1231,7 +1231,9 @@ public class GPXUtilities {
public static String writeGpxFile(File fout, GPXFile file, OsmandApplication ctx) { public static String writeGpxFile(File fout, GPXFile file, OsmandApplication ctx) {
Writer output = null; Writer output = null;
try { try {
if(fout.getParentFile() != null) {
fout.getParentFile().mkdirs(); fout.getParentFile().mkdirs();
}
output = new OutputStreamWriter(new FileOutputStream(fout), "UTF-8"); //$NON-NLS-1$ output = new OutputStreamWriter(new FileOutputStream(fout), "UTF-8"); //$NON-NLS-1$
String msg = writeGpx(output, file, ctx); String msg = writeGpx(output, file, ctx);
if(Algorithms.isEmpty(file.path)) { if(Algorithms.isEmpty(file.path)) {