aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-04-26 13:02:09 -0700
committerScott Jackson <daneren2005@gmail.com>2014-04-26 13:02:09 -0700
commit2e497dc6d0d95ee6153d1d9cf192708268030d7d (patch)
tree8d2ebd3df0ab1de1a14619ba34dad7b2f604db2c
parentcb9befec2a3c57c48b87b0f01cc086dd6bf83730 (diff)
downloaddsub-2e497dc6d0d95ee6153d1d9cf192708268030d7d.tar.gz
dsub-2e497dc6d0d95ee6153d1d9cf192708268030d7d.tar.bz2
dsub-2e497dc6d0d95ee6153d1d9cf192708268030d7d.zip
Crash fix
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index 19c7a44a..c707abb3 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -1534,7 +1534,11 @@ public class DownloadService extends Service {
private void handleError(Exception x) {
Log.w(TAG, "Media player error: " + x, x);
if(mediaPlayer != null) {
- mediaPlayer.reset();
+ try {
+ mediaPlayer.reset();
+ } catch(Exception e) {
+ Log.e(TAG, "Failed to reset player in error handler");
+ }
}
setPlayerState(IDLE);
}