From 5fc25df4eb3cf1427a00319e5599ab0c97022416 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 26 Apr 2016 21:29:31 -0700 Subject: Fix lots of error logs if path is null --- app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java b/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java index 4df56022..1da3d51b 100644 --- a/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java +++ b/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java @@ -309,6 +309,10 @@ public class MusicDirectory implements Serializable { public void rebaseTitleOffPath() { try { String filename = getPath(); + if(filename == null) { + return; + } + int index = filename.lastIndexOf('/'); if (index != -1) { filename = filename.substring(index + 1); -- cgit v1.2.3