aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorHeiko W. Rupp <hwr@pilhuhn.de>2012-09-12 11:39:21 +0200
committerHeiko W. Rupp <hwr@pilhuhn.de>2012-09-12 11:39:21 +0200
commit41fea7a159e0b669a2d30ceeeccc3f623e6ff582 (patch)
tree20f6fcc2028ba130d1d215ae9c52ceba24f7f047 /main/src
parent70bacd6a868db73d9a8cef23fe1885b5b147e991 (diff)
downloadcgeo-41fea7a159e0b669a2d30ceeeccc3f623e6ff582.zip
cgeo-41fea7a159e0b669a2d30ceeeccc3f623e6ff582.tar.gz
cgeo-41fea7a159e0b669a2d30ceeeccc3f623e6ff582.tar.bz2
The variable 'search' can be null if the app is offline and the user e.g. calls "nearby caches" from the main screen.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/cgeocaches.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java
index e4f1926..c6b211a 100644
--- a/main/src/cgeo/geocaching/cgeocaches.java
+++ b/main/src/cgeo/geocaching/cgeocaches.java
@@ -271,7 +271,9 @@ public class cgeocaches extends AbstractListActivity {
private void replaceCacheListFromSearch() {
cacheList.clear();
- cacheList.addAll(search.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB));
+ if (search!=null) {
+ cacheList.addAll(search.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB));
+ }
}
protected void updateTitle() {