diff options
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 69ed7c7f..a5b647a9 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -1888,6 +1888,10 @@ public class DownloadService extends Service { return isPastCutoff(getPlayerPosition(), getPlayerDuration()); } private boolean isPastCutoff(int position, int duration) { + if(currentPlaying == null) { + return false; + } + int cutoffPoint = (int) (duration * DELETE_CUTOFF); boolean isPastCutoff = duration > 0 && position > cutoffPoint; |