aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgeoadvsearch.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/cgeoadvsearch.java')
-rw-r--r--main/src/cgeo/geocaching/cgeoadvsearch.java8
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.");