aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/maps/CGeoMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/maps/CGeoMap.java')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 8156309..1f682cc 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1119,14 +1119,10 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
SearchResult searchResult;
if (mapMode == MapMode.LIVE) {
- if (isLiveEnabled) {
- searchResult = new SearchResult();
- } else {
- searchResult = new SearchResult(cgData.loadStoredInViewport(viewport, Settings.getCacheType()));
- }
+ searchResult = isLiveEnabled ? new SearchResult() : new SearchResult(cgData.loadStoredInViewport(viewport, Settings.getCacheType()));
} else {
// map started from another activity
- searchResult = new SearchResult(searchIntent);
+ searchResult = searchIntent != null ? new SearchResult(searchIntent) : new SearchResult();
if (geocodeIntent != null) {
searchResult.addGeocode(geocodeIntent);
}