Add null-check for logging exceptions.

This commit is contained in:
FireMasterK 2021-07-22 15:16:47 +05:30
parent b8c6fbf9b1
commit 6641ddc043
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -289,7 +289,7 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher {
private @NotNull HttpResponse getErrorResponse(Exception e) {
if (e instanceof ExecutionException)
if (e.getCause() != null && e instanceof ExecutionException)
e = (Exception) e.getCause();
if (!(e instanceof AgeRestrictedContentException || e instanceof ContentNotAvailableException))