[Android] Fix ArrayIndexOutOfBoundsException in equalizer

Geoffrey Métais git at videolan.org
Wed Oct 4 14:40:02 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Oct  4 14:08:53 2017 +0200| [14b65ffb864afd1be93c4956d71b1b2545d3fdc9] | committer: Geoffrey Métais

Fix ArrayIndexOutOfBoundsException in equalizer

> https://code.videolan.org/videolan/vlc-android/commit/14b65ffb864afd1be93c4956d71b1b2545d3fdc9
---

 vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
index dbe27b277..48ffd2b0d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
@@ -241,7 +241,7 @@ public class EqualizerFragment extends AppCompatDialogFragment implements Playba
                 binding.equalizerButton.setChecked(true);
 
             //save set if changes made (needs old currentPosition)
-            if (!mState.saved && !updateAlreadyHandled)
+            if (savePos >= 0 && !mState.saved && !updateAlreadyHandled)
                 createSaveCustomSetDialog(savePos, false, false);
 
             updateEqualizer(pos);



More information about the Android mailing list