diff options
| author | blafoo <github@blafoo.de> | 2012-02-27 22:46:45 +0100 |
|---|---|---|
| committer | blafoo <github@blafoo.de> | 2012-02-27 22:46:45 +0100 |
| commit | fb32348742ac361741631a173a1de868593b6255 (patch) | |
| tree | 01fef8f71851574f02618b3922d96d4e11d93f96 /main/src | |
| parent | 4cee87eb93e66e9f89750a17a7a03850a0c9e08b (diff) | |
| download | cgeo-fb32348742ac361741631a173a1de868593b6255.zip cgeo-fb32348742ac361741631a173a1de868593b6255.tar.gz cgeo-fb32348742ac361741631a173a1de868593b6255.tar.bz2 | |
Avoid NPE
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/cgBase.java | 3 |
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()); } |
