aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorcampbeb <bpcampbell@gmail.com>2013-06-04 19:01:09 -1000
committercampbeb <bpcampbell@gmail.com>2013-06-04 19:01:09 -1000
commit90826004f5f41d87da94604fbb96b43fa6786978 (patch)
treef1c0a0bd5d0c1b46b0943c79cb4abd447a2f4d81 /main
parent70c2bec739bd01224d729abd643a4c2ce4d4dce1 (diff)
downloadcgeo-90826004f5f41d87da94604fbb96b43fa6786978.zip
cgeo-90826004f5f41d87da94604fbb96b43fa6786978.tar.gz
cgeo-90826004f5f41d87da94604fbb96b43fa6786978.tar.bz2
Fix #2837 - Check for null waypoint coords in hasIdenticalWaypoint
Fixes #2837
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/Geocache.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index 8f5b13c..f99fee6 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -1431,7 +1431,9 @@ public class Geocache implements ICache, IWaypoint {
private boolean hasIdenticalWaypoint(final Geopoint point) {
for (final Waypoint waypoint: waypoints) {
- if (waypoint.getCoords().equals(point)) {
+ // waypoint can have no coords such as a Final set by cache owner
+ final Geopoint coords = waypoint.getCoords();
+ if (coords != null && coords.equals(point)) {
return true;
}
}