aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCParser.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java
index 9c9e06d..71f8045 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCParser.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java
@@ -34,6 +34,7 @@ import cgeo.geocaching.utils.MatcherWrapper;
import cgeo.geocaching.utils.TextUtils;
import ch.boye.httpclientandroidlib.HttpResponse;
+
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringEscapeUtils;
@@ -1604,8 +1605,17 @@ public abstract class GCParser {
rawResponse = TextUtils.getMatch(page, GCConstants.PATTERN_LOGBOOK, "");
}
+ return parseLogs(friends, rawResponse);
+ }
+
+ private static List<LogEntry> parseLogs(final boolean friends, String rawResponse) {
final List<LogEntry> logs = new ArrayList<LogEntry>();
+ // for non logged in users the log book is not shown
+ if (StringUtils.isBlank(rawResponse)) {
+ return logs;
+ }
+
try {
final JSONObject resp = new JSONObject(rawResponse);
if (!resp.getString("status").equals("success")) {