diff --git a/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/OpenSearch.java b/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/OpenSearch.java index 330d67b4b..6a9261e5f 100644 --- a/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/OpenSearch.java +++ b/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/OpenSearch.java @@ -313,8 +313,8 @@ protected CompletableFuture assignBestCover(final CoverHolder result, } else { return asyncGet(url, false) .handle((response, throwable) -> { - response.close(); - if (throwable == null) { + if (response != null) response.close(); + if (throwable == null && response != null) { result.setCover(url); } else { assignBestCover(result, queue).join();