diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2012-04-25 17:27:29 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2012-04-25 17:27:29 +0200 |
| commit | 185ab9b6b4b4742e56b209ae212d84f8fcb53f68 (patch) | |
| tree | efe71e62e2777b7e5cedf73fd6742ea3406eaeef /main/src | |
| parent | 489b22e3600ab6058bf4223f25b2f5f24a38ed31 (diff) | |
| download | cgeo-185ab9b6b4b4742e56b209ae212d84f8fcb53f68.zip cgeo-185ab9b6b4b4742e56b209ae212d84f8fcb53f68.tar.gz cgeo-185ab9b6b4b4742e56b209ae212d84f8fcb53f68.tar.bz2 | |
Fix: check that coordinates are not null
Do as the comment says and accept (and skip) points with null
coordinates. Bug found by chance during a test run while the website was
down.
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/geopoint/Viewport.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/geopoint/Viewport.java b/main/src/cgeo/geocaching/geopoint/Viewport.java index 1d082fc..1eeadce 100644 --- a/main/src/cgeo/geocaching/geopoint/Viewport.java +++ b/main/src/cgeo/geocaching/geopoint/Viewport.java @@ -150,7 +150,7 @@ public class Viewport { static public Viewport containing(final Set<? extends ICoordinates> points) { Viewport viewport = null; for (final ICoordinates point : points) { - if (point != null) { + if (point != null && point.getCoords() != null) { if (viewport == null) { viewport = new Viewport(point, point); } else { |
