aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Geocache.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-06-08 10:35:47 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-06-08 10:35:47 +0200
commit934945bddf33ec77ee77daff1add6498fe08e400 (patch)
tree73542a8f4901399cd95c5497e5a72d3d493c3aaa /main/src/cgeo/geocaching/Geocache.java
parent97df73c9ca484902a5ab2744c7c5beb57d550b42 (diff)
downloadcgeo-934945bddf33ec77ee77daff1add6498fe08e400.zip
cgeo-934945bddf33ec77ee77daff1add6498fe08e400.tar.gz
cgeo-934945bddf33ec77ee77daff1add6498fe08e400.tar.bz2
fix #2841: *.loc from waymarking not imported
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-rw-r--r--main/src/cgeo/geocaching/Geocache.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index fd1c2ce..66b23bf 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -1561,9 +1561,12 @@ public class Geocache implements ICache, IWaypoint {
Geocache cache;
// get cache details, they may not yet be complete
if (origCache != null) {
+ SearchResult search = null;
// only reload the cache if it was already stored or doesn't have full details (by checking the description)
if (origCache.isOffline() || StringUtils.isBlank(origCache.getDescription())) {
- final SearchResult search = searchByGeocode(origCache.getGeocode(), null, listId, false, handler);
+ search = searchByGeocode(origCache.getGeocode(), null, listId, false, handler);
+ }
+ if (search != null) {
cache = search.getFirstCacheFromResult(LoadFlags.LOAD_CACHE_OR_DB);
} else {
cache = origCache;