aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgCache.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-01-04 20:05:40 +0100
committerBananeweizen <bananeweizen@gmx.de>2012-01-04 20:05:40 +0100
commit610379fb56406b0d4ac2b4f30f0d28dcdbb34e2e (patch)
tree0493ba1c183e453d38784e36e489dee84a643e7c /main/src/cgeo/geocaching/cgCache.java
parent6a51296c54e9ddc339a63bd6258adddad6258ece (diff)
downloadcgeo-610379fb56406b0d4ac2b4f30f0d28dcdbb34e2e.zip
cgeo-610379fb56406b0d4ac2b4f30f0d28dcdbb34e2e.tar.gz
cgeo-610379fb56406b0d4ac2b4f30f0d28dcdbb34e2e.tar.bz2
fix: NPE for imported caches without any log
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
-rw-r--r--main/src/cgeo/geocaching/cgCache.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java
index 92023e5..2f9f09c 100644
--- a/main/src/cgeo/geocaching/cgCache.java
+++ b/main/src/cgeo/geocaching/cgCache.java
@@ -804,9 +804,12 @@ public class cgCache implements ICache {
/**
* @param allLogs
* true for all logs, false for friend logs only
- * @return the logs with all entries or just the entries of the friends
+ * @return the logs with all entries or just the entries of the friends, never <code>null</code>
*/
public List<cgLog> getLogs(boolean allLogs) {
+ if (logs == null) {
+ return Collections.emptyList();
+ }
if (allLogs) {
return logs;
}