Commit f727867c authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent NPE in Equalizer

(cherry picked from commit 0f6898b3)
parent 1b734463
...@@ -171,7 +171,8 @@ public class EqualizerFragment extends PlaybackServiceFragment { ...@@ -171,7 +171,8 @@ public class EqualizerFragment extends PlaybackServiceFragment {
preamp.setProgress((int) mEqualizer.getPreAmp() + 20); preamp.setProgress((int) mEqualizer.getPreAmp() + 20);
for (int i = 0; i < BAND_COUNT; ++i) { for (int i = 0; i < BAND_COUNT; ++i) {
EqualizerBar bar = (EqualizerBar) bands_layout.getChildAt(i); EqualizerBar bar = (EqualizerBar) bands_layout.getChildAt(i);
bar.setValue(mEqualizer.getAmp(i)); if (bar != null)
bar.setValue(mEqualizer.getAmp(i));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment