From 7aa5e9b72c414a627cd3cfab5d9a7ad9658dfd81 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 23 Apr 2013 07:30:45 -0700 Subject: Added in safety check that start can't be -1 --- .../src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 6d134314..b78e25d7 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -1289,6 +1289,9 @@ public class DownloadServiceImpl extends Service implements DownloadService { if(n != 0) { int start = currentPlaying == null ? 0 : getCurrentPlayingIndex(); + if(start == -1) { + start = 0; + } int i = start; do { DownloadFile downloadFile = downloadList.get(i); -- cgit v1.2.3