aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);