aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-09-03 22:25:12 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-09-03 22:30:08 +0200
commit17117220ef1a20f58e284fe8144f916509d73e3c (patch)
treebf12f0d67eeb0a30114d356c77089af254cd6b6f /main/src/cgeo
parentfa10c783bd0a07578d7ba896190e2667629ce1e4 (diff)
parent20a1a96d3844a873408c992a25077a022267178f (diff)
downloadcgeo-17117220ef1a20f58e284fe8144f916509d73e3c.zip
cgeo-17117220ef1a20f58e284fe8144f916509d73e3c.tar.gz
cgeo-17117220ef1a20f58e284fe8144f916509d73e3c.tar.bz2
Merge branch 'release' into upstream
Closes #2018.
Diffstat (limited to 'main/src/cgeo')
-rw-r--r--main/src/cgeo/geocaching/geopoint/Viewport.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/geopoint/Viewport.java b/main/src/cgeo/geocaching/geopoint/Viewport.java
index 7d3fb57..9095f53 100644
--- a/main/src/cgeo/geocaching/geopoint/Viewport.java
+++ b/main/src/cgeo/geocaching/geopoint/Viewport.java
@@ -71,7 +71,8 @@ public class Viewport {
*/
public boolean contains(final ICoordinates point) {
final Geopoint coords = point.getCoords();
- return coords.getLongitudeE6() >= bottomLeft.getLongitudeE6()
+ return coords != null
+ && coords.getLongitudeE6() >= bottomLeft.getLongitudeE6()
&& coords.getLongitudeE6() <= topRight.getLongitudeE6()
&& coords.getLatitudeE6() >= bottomLeft.getLatitudeE6()
&& coords.getLatitudeE6() <= topRight.getLatitudeE6();
@@ -120,7 +121,7 @@ public class Viewport {
/**
* Return a viewport that contains the current viewport as well as another point.
- *
+ *
* @param point
* the point we want in the viewport
* @return either the same or an expanded viewport