[Android] Prevent NPE at app init

Geoffrey Métais git at videolan.org
Fri Oct 13 15:47:49 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct 13 09:28:16 2017 +0200| [0f5b1e3d91848a9baa5d8f836bed62826b9eac34] | committer: Geoffrey Métais

Prevent NPE at app init

> https://code.videolan.org/videolan/vlc-android/commit/0f5b1e3d91848a9baa5d8f836bed62826b9eac34
---

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

diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index 5e3a6ead3..f54c87ce5 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -159,7 +159,7 @@ public class VLCApplication extends Application {
     }
 
     public static boolean showTvUi() {
-        return sTV || mSettings.getBoolean("tv_ui", false);
+        return sTV || (mSettings != null && mSettings.getBoolean("tv_ui", false));
     }
 
     public static void runBackground(Runnable runnable) {



More information about the Android mailing list