aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Geocache.java
diff options
context:
space:
mode:
authorrsudev <rasch@munin-soft.de>2013-06-04 22:20:40 -0700
committerrsudev <rasch@munin-soft.de>2013-06-04 22:20:40 -0700
commite657d819d23f2e2749be4499ba2d5e9862c4a6b0 (patch)
tree08c3a2a9ecd12ef4f4a367d456f84c5bdf2f8854 /main/src/cgeo/geocaching/Geocache.java
parent0ff5a681225168c58eb7860d1d31d68af7955bdf (diff)
parent90826004f5f41d87da94604fbb96b43fa6786978 (diff)
downloadcgeo-e657d819d23f2e2749be4499ba2d5e9862c4a6b0.zip
cgeo-e657d819d23f2e2749be4499ba2d5e9862c4a6b0.tar.gz
cgeo-e657d819d23f2e2749be4499ba2d5e9862c4a6b0.tar.bz2
Merge pull request #2838 from campbeb/fix2837
Fix #2837 - Check for null waypoint coords in hasIdenticalWaypoint
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-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;
}
}