Skip to content

Commit

Permalink
OpenSearch: fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
johan12345 committed Oct 21, 2020
1 parent c6c107b commit 39c1b46
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ protected CompletableFuture<Void> 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();
Expand Down

0 comments on commit 39c1b46

Please sign in to comment.