From 90826004f5f41d87da94604fbb96b43fa6786978 Mon Sep 17 00:00:00 2001 From: campbeb Date: Tue, 4 Jun 2013 19:01:09 -1000 Subject: Fix #2837 - Check for null waypoint coords in hasIdenticalWaypoint Fixes #2837 --- main/src/cgeo/geocaching/Geocache.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main') 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; } } -- cgit v1.1