From 30cd08b2f2177cf1cd86d982807b6632c6241f62 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 28 Dec 2012 18:26:20 -0800 Subject: Fix crash on exit --- .../src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); + } } } }); -- cgit v1.2.3