diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-03-30 18:32:36 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-03-30 18:32:36 -0700 |
commit | b2e2394150a14cbffb00fd0a07e37241a3aa8d2b (patch) | |
tree | 68e7e267534a6c80f92fe3f701c047469e61d684 /src/github | |
parent | cf7c0e718ca45dc3fbf0cdfc4118122658e96776 (diff) | |
download | dsub-b2e2394150a14cbffb00fd0a07e37241a3aa8d2b.tar.gz dsub-b2e2394150a14cbffb00fd0a07e37241a3aa8d2b.tar.bz2 dsub-b2e2394150a14cbffb00fd0a07e37241a3aa8d2b.zip |
Fix error if cache location is null
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/RESTMusicService.java | 2 |
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); |