aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java2
-rw-r--r--main/src/cgeo/geocaching/cgBase.java2
-rw-r--r--main/src/cgeo/geocaching/cgCache.java5
3 files changed, 6 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index 7cb33af..602f340 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -2204,7 +2204,7 @@ public class CacheDetailActivity extends AbstractActivity {
// cache logs
RelativeLayout rowView;
- if (cache != null && cache.getLogs(allLogs) != null) {
+ if (cache != null) {
for (cgLog log : cache.getLogs(allLogs)) {
rowView = (RelativeLayout) getLayoutInflater().inflate(R.layout.cacheview_logs_item, null);
diff --git a/main/src/cgeo/geocaching/cgBase.java b/main/src/cgeo/geocaching/cgBase.java
index 9097e75..273b36b 100644
--- a/main/src/cgeo/geocaching/cgBase.java
+++ b/main/src/cgeo/geocaching/cgBase.java
@@ -2674,7 +2674,7 @@ public class cgBase {
}
// store images from logs
- if (Settings.isStoreLogImages() && cache.getLogs(true) != null) {
+ if (Settings.isStoreLogImages()) {
for (cgLog log : cache.getLogs(true)) {
if (CollectionUtils.isNotEmpty(log.logImages)) {
for (cgImage oneLogImg : log.logImages) {
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;
}