aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsudev <rasch@munin-soft.de>2012-02-24 21:51:00 +0100
committerrsudev <rasch@munin-soft.de>2012-02-24 22:00:11 +0100
commitb568a142cd2de1f4ee3252e3710dcedf93fa9360 (patch)
tree867ef14c9c7e1dee04b21cccb5f50cecf7c5e0b1
parenta222cdadfe9318dd4160c11bcc6143a3b2849ede (diff)
downloadcgeo-b568a142cd2de1f4ee3252e3710dcedf93fa9360.zip
cgeo-b568a142cd2de1f4ee3252e3710dcedf93fa9360.tar.gz
cgeo-b568a142cd2de1f4ee3252e3710dcedf93fa9360.tar.bz2
Fixes #1178, crash on invalid listid
- checks if list still exists, switches to standard list if not
-rw-r--r--main/src/cgeo/geocaching/cgeocaches.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/cgeocaches.java b/main/src/cgeo/geocaching/cgeocaches.java
index 7bf0de7..3d25087 100644
--- a/main/src/cgeo/geocaching/cgeocaches.java
+++ b/main/src/cgeo/geocaching/cgeocaches.java
@@ -562,7 +562,13 @@ public class cgeocaches extends AbstractListActivity {
title = res.getString(R.string.stored_caches_button);
} else {
final StoredList list = app.getList(listId);
- title = list.title;
+ // Check if list id is still valid
+ if (null == list) {
+ listId = StoredList.STANDARD_LIST_ID;
+ title = res.getString(R.string.stored_caches_button);
+ } else {
+ title = list.title;
+ }
}
setTitle(title);