diff --git a/app/src/main/java/com/cappielloantonio/tempo/repository/ArtistRepository.java b/app/src/main/java/com/cappielloantonio/tempo/repository/ArtistRepository.java index 2f8d0dc7..334797ca 100644 --- a/app/src/main/java/com/cappielloantonio/tempo/repository/ArtistRepository.java +++ b/app/src/main/java/com/cappielloantonio/tempo/repository/ArtistRepository.java @@ -63,8 +63,10 @@ public class ArtistRepository { if (response.isSuccessful() && response.body() != null) { List artists = new ArrayList<>(); - for (IndexID3 index : response.body().getSubsonicResponse().getArtists().getIndices()) { - artists.addAll(index.getArtists()); + if(response.body().getSubsonicResponse().getArtists() != null) { + for (IndexID3 index : response.body().getSubsonicResponse().getArtists().getIndices()) { + artists.addAll(index.getArtists()); + } } if (random) {