diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-09-09 08:56:47 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-09-09 08:56:47 -0700 |
commit | ab687f2a8e4220f6638e87d6a6b6b98b5844a2cf (patch) | |
tree | 3f14c888a833ca8393fb42d3427de18a04febe49 /app/src | |
parent | d0c06a17cf1ced28e4765585b5d103f644d6ed3d (diff) | |
download | dsub-ab687f2a8e4220f6638e87d6a6b6b98b5844a2cf.tar.gz dsub-ab687f2a8e4220f6638e87d6a6b6b98b5844a2cf.tar.bz2 dsub-ab687f2a8e4220f6638e87d6a6b6b98b5844a2cf.zip |
Fix for crash on playAll
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index cfbfa2af..93188e2f 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -113,6 +113,10 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section super.onCreate(bundle); if(bundle != null) { entries = (List<Entry>) bundle.getSerializable(Constants.FRAGMENT_LIST); + albums = (List<Entry>) bundle.getSerializable(Constants.FRAGMENT_LIST2); + if(albums == null) { + albums = new ArrayList<>(); + } artistInfo = (ArtistInfo) bundle.getSerializable(Constants.FRAGMENT_EXTRA); restoredInstance = true; } @@ -803,7 +807,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section } } private void playAll(final boolean shuffle, final boolean append) { - boolean hasSubFolders = !albums.isEmpty(); + boolean hasSubFolders = albums != null && !albums.isEmpty(); if (hasSubFolders && (id != null || share != null || "starred".equals(albumListType))) { downloadRecursively(id, false, append, !append, shuffle, false); |