aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java2
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java b/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
index 213e806..3716f0c 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
@@ -43,7 +43,7 @@ abstract class AbstractStaticMapsApp extends AbstractApp implements CacheNavigat
protected static boolean invokeStaticMaps(final Activity activity, final cgCache cache, final cgWaypoint waypoint, final boolean download) {
final ILogable logable = cache != null && cache.getListId() != 0 ? cache : waypoint;
- final String geocode = logable.getGeocode().toUpperCase();
+ final String geocode = StringUtils.upperCase(logable.getGeocode());
if (geocode == null) {
ActivityMixin.showToast(activity, getString(R.string.err_detail_no_map_static));
return true;
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 258d93d..5d0aa60 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1230,7 +1230,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (mapMode == MapMode.SINGLE || (cachesCnt < Settings.getWayPointsThreshold())) {
for (cgWaypoint waypoint : waypointsToDisplay) {
- if (waypoint.getCoords() == null) {
+ if (waypoint == null || waypoint.getCoords() == null) {
continue;
}
@@ -1239,7 +1239,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
for (cgCache cache : cachesToDisplay) {
- if (cache.getCoords() == null) {
+ if (cache == null || cache.getCoords() == null) {
continue;
}
itemsToDisplay.add(getItem(cache, cache, null));