diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-01-07 06:42:47 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-01-07 06:42:47 -0800 |
commit | 663bdfac27598d4e94673a8ed74e83cdfd373df8 (patch) | |
tree | 388523a7b2e4c7adedf5476e317426b25f3f232a | |
parent | 331e908f45587c99172cefb47744cf690843fb70 (diff) | |
download | dsub-663bdfac27598d4e94673a8ed74e83cdfd373df8.tar.gz dsub-663bdfac27598d4e94673a8ed74e83cdfd373df8.tar.bz2 dsub-663bdfac27598d4e94673a8ed74e83cdfd373df8.zip |
Fix another strange crash in logs
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index a6d7ff4d..671b164a 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -297,9 +297,11 @@ public class DownloadServiceImpl extends Service implements DownloadService { offset = 0; } for (MusicDirectory.Entry song : songs) { - DownloadFile downloadFile = new DownloadFile(this, song, save); - downloadList.add(getCurrentPlayingIndex() + offset, downloadFile); - offset++; + if(song != null) { + DownloadFile downloadFile = new DownloadFile(this, song, save); + downloadList.add(getCurrentPlayingIndex() + offset, downloadFile); + offset++; + } } setNextPlaying(); revision++; |