[Android] Fixes NPE
Geoffrey Métais
git at videolan.org
Tue Oct 20 11:48:28 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 19 19:01:26 2015 +0200| [a233b8918e56b2c7fd36b9b40c3d1f4cd61ce9b6] | committer: Geoffrey Métais
Fixes NPE
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a233b8918e56b2c7fd36b9b40c3d1f4cd61ce9b6
---
vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesUi.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesUi.java b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesUi.java
index 5a67e26..7643c07 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesUi.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesUi.java
@@ -42,6 +42,8 @@ public class PreferencesUi extends BasePreferenceFragment {
@Override
public boolean onPreferenceTreeClick(Preference preference) {
+ if (preference.getKey() == null)
+ return false;
switch (preference.getKey()){
case "enable_headset_detection":
((PreferencesActivity)getActivity()).detectHeadset(((TwoStatePreference) preference).isChecked());
More information about the Android
mailing list