diff --git a/OsmAnd/src/net/osmand/data/PointDescription.java b/OsmAnd/src/net/osmand/data/PointDescription.java index 1a82f46294..81a316d4a3 100644 --- a/OsmAnd/src/net/osmand/data/PointDescription.java +++ b/OsmAnd/src/net/osmand/data/PointDescription.java @@ -85,6 +85,9 @@ public class PointDescription { public void setName(String name){ this.name = name; + if (this.name == null) { + this.name = ""; + } } public String getTypeName() { diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 93b60495dc..5a22ec4e12 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -77,7 +77,7 @@ public class OsmandSettings { private List>> l = null; @Override - public void addListener(StateChangedListener listener) { + public synchronized void addListener(StateChangedListener listener) { if (l == null) { l = new LinkedList>>(); } @@ -86,7 +86,7 @@ public class OsmandSettings { } } - public void fireEvent(T value) { + public synchronized void fireEvent(T value) { if (l != null) { Iterator>> it = l.iterator(); while (it.hasNext()) { @@ -101,7 +101,7 @@ public class OsmandSettings { } @Override - public void removeListener(StateChangedListener listener) { + public synchronized void removeListener(StateChangedListener listener) { if (l != null) { Iterator>> it = l.iterator(); while (it.hasNext()) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java index 2dba4f7f6e..54bbc6b83e 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java @@ -99,7 +99,7 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi menu.getMapActivity().getSupportFragmentManager().beginTransaction() .setCustomAnimations(slideInAnim, slideOutAnim, slideInAnim, slideOutAnim) .add(R.id.fragmentContainer, fragment, TAG) - .addToBackStack(TAG).commit(); + .addToBackStack(TAG).commitAllowingStateLoss(); } private void runLayoutListener() {