diff options
-rw-r--r-- | main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java index d6ce598..b2ce11a 100644 --- a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java +++ b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java @@ -359,11 +359,11 @@ public class CoordinatesInputDialog extends NoTitleDialog { current = new Geopoint(latDir, latDeg, latMin, latSec, latSecFrac, lonDir, lonDeg, lonMin, lonSec, lonSecFrac); break; case Plain: - // This case has been handled above. Help FindBugs by asserting that current cannot be null even here - assert current != null; + // This case has been handled above } } - if (current.isValid()) { + // The null check is necessary to keep FindBugs happy + if (current != null && current.isValid()) { gp = current; return true; } |