aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/cgBase.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/cgBase.java b/main/src/cgeo/geocaching/cgBase.java
index e9e038d..e2bb77f 100644
--- a/main/src/cgeo/geocaching/cgBase.java
+++ b/main/src/cgeo/geocaching/cgBase.java
@@ -1808,8 +1808,7 @@ public class cgBase {
request.addHeader("X-Requested-With", "XMLHttpRequest");
final HttpResponse response = request(request);
try {
- final HttpEntity entity = response.getEntity();
- return BitmapFactory.decodeStream(entity.getContent());
+ return response != null ? BitmapFactory.decodeStream(response.getEntity().getContent()) : null;
} catch (IOException e) {
Log.e(Settings.tag, "cgBase.requestMapTile() " + e.getMessage());
}