From 1654cf11f1b61532e5270fd53b152906fb2e590c Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 22 May 2013 21:31:16 -0700 Subject: Fix a rare crash that only seems to happen when shuffle play is enabled --- .../src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subsonic-android') diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index fbb15b73..f659a434 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -209,6 +209,8 @@ public class DownloadServiceImpl extends Service implements DownloadService { @Override public void onDestroy() { super.onDestroy(); + instance = null; + if(currentPlaying != null) currentPlaying.setPlaying(false); if(sleepTimer != null){ sleepTimer.cancel(); @@ -249,8 +251,6 @@ public class DownloadServiceImpl extends Service implements DownloadService { nextPlayingTask.cancel(); } Util.hidePlayingNotification(this, this, handler); - - instance = null; } public static DownloadService getInstance() { -- cgit v1.2.3