From 741ea73b0e45bd983afd1f411559755ee59fe8b0 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 30 Oct 2014 13:54:42 -0700 Subject: Fix NPE when browsing any artists --- src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 54d88746..677664b5 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -483,7 +483,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter // Update the fragment pointers so other stuff works correctly SelectDirectoryFragment.this.id = dir.getId(); SelectDirectoryFragment.this.name = dir.getName(); - } else if(id != null && directory == null) { + } else if(id != null && directory == null && dir.getParent() != null) { // View Album, try to lookup parent to get a complete entry to use for starring MusicDirectory parentDir = getMusicDirectory(dir.getParent(), name, refresh, service, this); for(Entry child: parentDir.getChildren()) { -- cgit v1.2.3