aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/ui/Formatter.java
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2012-12-29 10:20:34 +0100
committerBananeweizen <Bananeweizen@gmx.de>2012-12-29 10:20:34 +0100
commit7d6c8ca06ab9c7833875fdd77bacd2471a9e5a41 (patch)
treecbb7b41a8c5b6fca0613afab43ea96317de3b360 /main/src/cgeo/geocaching/ui/Formatter.java
parentf0ca3839442f1702d729e02045d536a35da874dd (diff)
downloadcgeo-7d6c8ca06ab9c7833875fdd77bacd2471a9e5a41.zip
cgeo-7d6c8ca06ab9c7833875fdd77bacd2471a9e5a41.tar.gz
cgeo-7d6c8ca06ab9c7833875fdd77bacd2471a9e5a41.tar.bz2
fix #2300: WP "Original coords" does not have a type
Diffstat (limited to 'main/src/cgeo/geocaching/ui/Formatter.java')
-rw-r--r--main/src/cgeo/geocaching/ui/Formatter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/ui/Formatter.java b/main/src/cgeo/geocaching/ui/Formatter.java
index e006d57..ea2ecb5 100644
--- a/main/src/cgeo/geocaching/ui/Formatter.java
+++ b/main/src/cgeo/geocaching/ui/Formatter.java
@@ -153,8 +153,9 @@ public abstract class Formatter {
public static String formatWaypointInfo(cgWaypoint waypoint) {
final List<String> infos = new ArrayList<String>(3);
- if (WaypointType.ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL.contains(waypoint.getWaypointType())) {
- infos.add(waypoint.getWaypointType().getL10n());
+ WaypointType waypointType = waypoint.getWaypointType();
+ if (waypointType != WaypointType.OWN && waypointType != null) {
+ infos.add(waypointType.getL10n());
}
if (cgWaypoint.PREFIX_OWN.equalsIgnoreCase(waypoint.getPrefix())) {
infos.add(cgeoapplication.getInstance().getString(R.string.waypoint_custom));