From 17e64f3dd061e3e40d9470b89800a7a63155b343 Mon Sep 17 00:00:00 2001 From: antonio Date: Sat, 24 Jun 2023 13:38:45 +0200 Subject: [PATCH] fix: cull checking --- .../com/cappielloantonio/tempo/repository/SongRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/cappielloantonio/tempo/repository/SongRepository.java b/app/src/main/java/com/cappielloantonio/tempo/repository/SongRepository.java index 7a5a59f5..919c816c 100644 --- a/app/src/main/java/com/cappielloantonio/tempo/repository/SongRepository.java +++ b/app/src/main/java/com/cappielloantonio/tempo/repository/SongRepository.java @@ -86,7 +86,7 @@ public class SongRepository { public void onResponse(@NonNull Call call, @NonNull Response response) { List songs = new ArrayList<>(); - if (response.isSuccessful() && response.body() != null && response.body().getSubsonicResponse().getRandomSongs() != null) { + if (response.isSuccessful() && response.body() != null && response.body().getSubsonicResponse().getRandomSongs() != null && response.body().getSubsonicResponse().getRandomSongs().getSongs() != null) { songs.addAll(response.body().getSubsonicResponse().getRandomSongs().getSongs()); }