[Android] VideoPlayer: Prevent NPE

Geoffrey Métais git at videolan.org
Tue Dec 18 14:55:55 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 18 14:00:02 2018 +0100| [669b1aec5db4a0ccb6c856e376a6d5ff46779943] | committer: Geoffrey Métais

VideoPlayer: Prevent NPE

> https://code.videolan.org/videolan/vlc-android/commit/669b1aec5db4a0ccb6c856e376a6d5ff46779943
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 73f804f5c..af3b43c5c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -539,7 +539,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
                 message = R.string.locked_in_landscape_mode;
             else
                 message = R.string.locked_in_portrait_mode;
-            UiTools.snacker(mRootView, message);
+            if (mRootView != null) UiTools.snacker(mRootView, message);
         }
 
         if (mTouchDelegate != null) {



More information about the Android mailing list