aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-03-30 18:32:36 -0700
committerScott Jackson <daneren2005@gmail.com>2015-03-30 18:32:36 -0700
commitb2e2394150a14cbffb00fd0a07e37241a3aa8d2b (patch)
tree68e7e267534a6c80f92fe3f701c047469e61d684
parentcf7c0e718ca45dc3fbf0cdfc4118122658e96776 (diff)
downloaddsub-b2e2394150a14cbffb00fd0a07e37241a3aa8d2b.tar.gz
dsub-b2e2394150a14cbffb00fd0a07e37241a3aa8d2b.tar.bz2
dsub-b2e2394150a14cbffb00fd0a07e37241a3aa8d2b.zip
Fix error if cache location is null
-rw-r--r--src/github/daneren2005/dsub/service/RESTMusicService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java
index 7def53c2..00108eac 100644
--- a/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -249,7 +249,7 @@ public class RESTMusicService implements MusicService {
public MusicDirectory getMusicDirectory(String id, String name, boolean refresh, Context context, ProgressListener progressListener) throws Exception {
SharedPreferences prefs = Util.getPreferences(context);
String cacheLocn = prefs.getString(Constants.PREFERENCES_KEY_CACHE_LOCATION, null);
- if(id.indexOf(cacheLocn) != -1) {
+ if(cacheLocn != null && id.indexOf(cacheLocn) != -1) {
String search = Util.parseOfflineIDSearch(context, id, cacheLocn);
SearchCritera critera = new SearchCritera(search, 1, 1, 0);
SearchResult result = searchNew(critera, context, progressListener);