From 3b3cb9f0299de2e8fec4764a6260fed2849a9061 Mon Sep 17 00:00:00 2001 From: Juan Luis Caro Date: Mon, 10 Oct 2022 15:00:13 +0200 Subject: [PATCH] Fix NPE when searching by isrc (#15) --- .../topisenpai/lavasrc/deezer/DeezerAudioSourceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/com/github/topisenpai/lavasrc/deezer/DeezerAudioSourceManager.java b/main/src/main/java/com/github/topisenpai/lavasrc/deezer/DeezerAudioSourceManager.java index 787fd7dc..350cb157 100644 --- a/main/src/main/java/com/github/topisenpai/lavasrc/deezer/DeezerAudioSourceManager.java +++ b/main/src/main/java/com/github/topisenpai/lavasrc/deezer/DeezerAudioSourceManager.java @@ -145,7 +145,7 @@ private AudioTrack parseTrack(JsonBrowser json) { private AudioItem getTrackByISRC(String isrc) throws IOException { var json = this.getJson(PUBLIC_API_BASE + "/track/isrc:" + isrc); - if (json == null) { + if (json == null || json.get("id").isNull()) { return AudioReference.NO_TRACK; } return this.parseTrack(json);