diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-02-15 18:32:57 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-02-15 18:32:57 -0800 |
commit | 87134444f79019bd72f3809d97160c423c10ec46 (patch) | |
tree | d7222ba6ec43b12595926850f5910d446b48051c /src/github/daneren2005 | |
parent | fd8b6a65195fabacb7e1934225cc6df0cd755ed4 (diff) | |
download | dsub-87134444f79019bd72f3809d97160c423c10ec46.tar.gz dsub-87134444f79019bd72f3809d97160c423c10ec46.tar.bz2 dsub-87134444f79019bd72f3809d97160c423c10ec46.zip |
Fix crash when trying to add header view after the fact
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index f11995f8..9e6608cf 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -714,7 +714,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter // Show header if not album list type and not root and not artist
// For Subsonic 5.1+ display a header for artists with getArtistInfo data if it exists
View header = null;
- if(albumListType == null && !"root".equals(id) && (!artist || artistInfo != null)) {
+ if(albumListType == null && !"root".equals(id) && (!artist || artistInfo != null) && entryAdapter == null) {
header = createHeader();
// Only add header to entry list if we aren't going recreate album grid as root anyways
if(header != null && entryList != null && (!addAlbumHeader || entries.size() > 0)) {
@@ -724,7 +724,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter }
// Needs to be added here, GB crashes if you to try to remove the header view before adapter is set
- if(addAlbumHeader) {
+ if(addAlbumHeader && entryAdapter == null) {
if(entries.size() > 0) {
entryList.addHeaderView(albumList);
} else {
|