aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-04-01 17:42:16 -0700
committerScott Jackson <daneren2005@gmail.com>2015-04-01 17:42:16 -0700
commit204e05fc31ec687d0c4fd4336dfa88493dfba3da (patch)
tree1bf2a11785c1d63eb3889768c0fc74ae1d51901d /src/github
parentec3bbec302f66afe3b3ed4af5bed7516ef7c57c4 (diff)
downloaddsub-204e05fc31ec687d0c4fd4336dfa88493dfba3da.tar.gz
dsub-204e05fc31ec687d0c4fd4336dfa88493dfba3da.tar.bz2
dsub-204e05fc31ec687d0c4fd4336dfa88493dfba3da.zip
Fix when cache location is null
Diffstat (limited to 'src/github')
-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 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);