[Android] Fix NPE

Geoffrey Métais git at videolan.org
Thu Nov 12 12:12:42 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 12 12:11:29 2015 +0100| [503f2e5bf202b32144e0f2b005eb519959e6d3fc] | committer: Geoffrey Métais

Fix NPE

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=503f2e5bf202b32144e0f2b005eb519959e6d3fc
---

 vlc-android/src/org/videolan/vlc/gui/preferences/Advanced.java |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/Advanced.java b/vlc-android/src/org/videolan/vlc/gui/preferences/Advanced.java
index 674aec8..32d3114 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/Advanced.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/Advanced.java
@@ -69,8 +69,7 @@ public class Advanced extends BasePreferenceFragment implements SharedPreference
         final HWDecoderUtil.AudioOutput aout = HWDecoderUtil.getAudioOutputFromDevice();
         if (aout == HWDecoderUtil.AudioOutput.AUDIOTRACK || aout == HWDecoderUtil.AudioOutput.OPENSLES) {
             /* no AudioOutput choice */
-            PreferenceGroup group = (PreferenceGroup) findPreference("advanced_prefs_group");
-            group.removePreference(aoutPref);
+            findPreference("aout").setVisible(false);
         } else {
             int aoutEntriesId = R.array.aouts;
             int aoutEntriesIdValues = R.array.aouts_values;



More information about the Android mailing list