From 98001b51d943feca7ee885c07f41504977b5bd6f Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 21 Apr 2017 17:57:57 +0200 Subject: Added null check when closing network request Fixes #2307 --- .../java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java index 0218b103a..4459fbd08 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java @@ -568,7 +568,9 @@ public class GpodnetService { e.printStackTrace(); throw new GpodnetServiceException(e); } finally { - body.close(); + if (body != null) { + body.close(); + } } return responseString; } -- cgit v1.2.3