diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-04-01 17:42:16 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-04-01 17:42:16 -0700 |
commit | 204e05fc31ec687d0c4fd4336dfa88493dfba3da (patch) | |
tree | 1bf2a11785c1d63eb3889768c0fc74ae1d51901d /src | |
parent | ec3bbec302f66afe3b3ed4af5bed7516ef7c57c4 (diff) | |
download | dsub-204e05fc31ec687d0c4fd4336dfa88493dfba3da.tar.gz dsub-204e05fc31ec687d0c4fd4336dfa88493dfba3da.tar.bz2 dsub-204e05fc31ec687d0c4fd4336dfa88493dfba3da.zip |
Fix when cache location is null
Diffstat (limited to 'src')
-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 00108eac..86138dbf 100644 --- a/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -1673,7 +1673,7 @@ public class RESTMusicService implements MusicService { private String getOfflineSongId(String id, 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 searchCriteria = Util.parseOfflineIDSearch(context, id, cacheLocn); SearchCritera critera = new SearchCritera(searchCriteria, 0, 0, 1); SearchResult result = searchNew(critera, context, progressListener); |