aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
index 5a3b8cf5..c557a174 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
@@ -1230,7 +1230,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
}
DownloadService downloadService = getDownloadService();
- if(downloadService.getSleepTimer() && timerMenu != null) {
+ if(downloadService != null && downloadService.getSleepTimer() && timerMenu != null) {
int timeRemaining = downloadService.getSleepTimeRemaining();
if(timeRemaining > 1){
timerMenu.setTitle(context.getResources().getString(R.string.download_stop_time_remaining, Util.formatDuration(timeRemaining)));