diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2011-10-24 20:48:15 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2011-10-24 20:48:15 +0200 |
commit | bd9311a32d611a25f8aa16c6fd89b2206024c860 (patch) | |
tree | 274b4496dfa09d3cd775b5c6480d87c326d13567 | |
parent | e5efa831a88cab7675b65a3fb596990d88975ee2 (diff) | |
download | cgeo-bd9311a32d611a25f8aa16c6fd89b2206024c860.zip cgeo-bd9311a32d611a25f8aa16c6fd89b2206024c860.tar.gz cgeo-bd9311a32d611a25f8aa16c6fd89b2206024c860.tar.bz2 |
fix: NPE in search
-rw-r--r-- | main/src/cgeo/geocaching/cgeoadvsearch.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/cgeoadvsearch.java b/main/src/cgeo/geocaching/cgeoadvsearch.java index 2a03ff4..882b2a7 100644 --- a/main/src/cgeo/geocaching/cgeoadvsearch.java +++ b/main/src/cgeo/geocaching/cgeoadvsearch.java @@ -217,8 +217,12 @@ public class cgeoadvsearch extends AbstractActivity { } if (geo.coordsNow != null) { - latEdit.setHint(cgBase.formatLatitude(geo.coordsNow.getLatitude(), false)); - lonEdit.setHint(cgBase.formatLongitude(geo.coordsNow.getLongitude(), false)); + if (latEdit != null) { + latEdit.setHint(cgBase.formatLatitude(geo.coordsNow.getLatitude(), false)); + } + if (lonEdit != null) { + lonEdit.setHint(cgBase.formatLongitude(geo.coordsNow.getLongitude(), false)); + } } } catch (Exception e) { Log.w(Settings.tag, "Failed to update location."); |