Skip to content
Snippets Groups Projects
Commit 11d1c92b authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix NPE

parent 7e9f286b
No related branches found
No related tags found
No related merge requests found
......@@ -202,8 +202,8 @@ public class VLCOptions {
@MainThread
public static MediaPlayer.Equalizer getEqualizerSetFromSettings(Context context) {
final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
if (pref.contains("equalizer_enabled")) {
final float[] bands = Preferences.getFloatArray(pref, "equalizer_values");
final float[] bands = Preferences.getFloatArray(pref, "equalizer_values");
if (bands != null && pref.contains("equalizer_enabled")) {
final int bandCount = MediaPlayer.Equalizer.getBandCount();
if (bands.length != bandCount + 1)
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment