diff options
author | Scott Jackson <daneren2005@gmail.com> | 2012-12-28 18:26:20 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2012-12-28 18:26:20 -0800 |
commit | 30cd08b2f2177cf1cd86d982807b6632c6241f62 (patch) | |
tree | cf107d8841e90ba9a7ff20e3fc41addd471272d4 /subsonic-android | |
parent | 1b61a87535846d5975c87686f40db1514aa88e5c (diff) | |
download | dsub-30cd08b2f2177cf1cd86d982807b6632c6241f62.tar.gz dsub-30cd08b2f2177cf1cd86d982807b6632c6241f62.tar.bz2 dsub-30cd08b2f2177cf1cd86d982807b6632c6241f62.zip |
Fix crash on exit
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index f353e5b4..66f8a79f 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -753,7 +753,11 @@ public class DownloadServiceImpl extends Service implements DownloadService { @Override public void run() { if(mediaPlayer != null) { - cachedPosition = mediaPlayer.getCurrentPosition(); + try { + cachedPosition = mediaPlayer.getCurrentPosition(); + } catch(Exception e) { + executorService.shutdown(); + } } } }); |