fix: null checking
This commit is contained in:
@@ -105,8 +105,10 @@ public class AlbumRepository {
|
|||||||
List<Child> tracks = new ArrayList<>();
|
List<Child> tracks = new ArrayList<>();
|
||||||
|
|
||||||
if (response.isSuccessful() && response.body() != null && response.body().getSubsonicResponse().getAlbum() != null) {
|
if (response.isSuccessful() && response.body() != null && response.body().getSubsonicResponse().getAlbum() != null) {
|
||||||
|
if (response.body().getSubsonicResponse().getAlbum().getSongs() != null) {
|
||||||
tracks.addAll(response.body().getSubsonicResponse().getAlbum().getSongs());
|
tracks.addAll(response.body().getSubsonicResponse().getAlbum().getSongs());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
albumTracks.setValue(tracks);
|
albumTracks.setValue(tracks);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user