diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index e9ab79051f..367bbb79f2 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -386,7 +386,7 @@ public class OsmandSettings { @Override protected boolean setValue(SharedPreferences prefs, String val) { - return prefs.edit().putString(getId(), val.trim()).commit(); + return prefs.edit().putString(getId(), (val != null) ? val.trim() : val).commit(); } }