From d9a02ed2779e2c073453d3b33bef3932db4111a0 Mon Sep 17 00:00:00 2001 From: sixcooler Date: Fri, 11 Oct 2013 00:44:04 +0200 Subject: [PATCH] NPE fix for my last commit --- source/net/yacy/cora/protocol/http/HTTPClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/yacy/cora/protocol/http/HTTPClient.java b/source/net/yacy/cora/protocol/http/HTTPClient.java index c82b28d6b..5cb3f4727 100644 --- a/source/net/yacy/cora/protocol/http/HTTPClient.java +++ b/source/net/yacy/cora/protocol/http/HTTPClient.java @@ -634,7 +634,7 @@ public class HTTPClient { } catch (final IOException e) { ConnectionInfo.removeConnection(httpUriRequest.hashCode()); httpUriRequest.abort(); - this.httpResponse.close(); + if (this.httpResponse != null) this.httpResponse.close(); throw new IOException("Client can't execute: " + (e.getCause() == null ? e.getMessage() : e.getCause().getMessage()) + " duration=" + Long.toString(System.currentTimeMillis() - time));