aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowner <owner@DeeDee-Laptop>2012-12-31 19:37:30 -0800
committerowner <owner@DeeDee-Laptop>2012-12-31 19:37:30 -0800
commit71f5540de691b9d69c8fea658e75e25664ca0e23 (patch)
treef825ac1007a9aada91570dbe8bc6a4dad8299b18
parentec1772fb89bff683fd88300560baa75d2b95e6e5 (diff)
downloaddsub-71f5540de691b9d69c8fea658e75e25664ca0e23.tar.gz
dsub-71f5540de691b9d69c8fea658e75e25664ca0e23.tar.bz2
dsub-71f5540de691b9d69c8fea658e75e25664ca0e23.zip
Fixes crash when genre is null
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java
index 705c460d..250417e7 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java
@@ -489,7 +489,7 @@ public class SubsonicTabActivity extends SherlockActivity {
public void displaySongInfo(final MusicDirectory.Entry song) {
String msg = "Artist: " + song.getArtist() + "\nAlbum: " + song.getAlbum();
- if(!song.getGenre().isEmpty()) {
+ if(song.getGenre() != null && !song.getGenre().isEmpty()) {
msg += "\nGenre: " + song.getGenre();
}
if(song.getYear() != null && song.getYear() != 0) {
@@ -503,7 +503,7 @@ public class SubsonicTabActivity extends SherlockActivity {
msg += "\nLength: " + Util.formatDuration(song.getDuration());
}
msg += "\nSize: " + Util.formatBytes(song.getSize());
-
+
new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(song.getTitle())