aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-10-20 09:15:59 -0700
committerScott Jackson <daneren2005@gmail.com>2015-10-20 09:15:59 -0700
commit57e13e94620b837e4945858b6d7f3f1d4abf6941 (patch)
tree554ea84e71537a0e7170455deb2110d1149b48ea /app
parent1d312b4920c5c62425fcb4aedd7b5be4981f5fb7 (diff)
downloaddsub-57e13e94620b837e4945858b6d7f3f1d4abf6941.tar.gz
dsub-57e13e94620b837e4945858b6d7f3f1d4abf6941.tar.bz2
dsub-57e13e94620b837e4945858b6d7f3f1d4abf6941.zip
Fix error on puase of EQ fragment if not able to grab a instance
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/EqualizerFragment.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/EqualizerFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/EqualizerFragment.java
index e2535e04..6ca2da4f 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/EqualizerFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/EqualizerFragment.java
@@ -112,10 +112,15 @@ public class EqualizerFragment extends SubsonicFragment {
@Override
public void onPause() {
super.onPause();
- equalizerController.saveSettings();
- if(!equalizer.getEnabled()) {
- equalizerController.release();
+ try {
+ equalizerController.saveSettings();
+
+ if (!equalizer.getEnabled()) {
+ equalizerController.release();
+ }
+ } catch(Exception e) {
+ Log.w(TAG, "Failed to release controller", e);
}
}