[Android] Video player: prevent NPE on switch to popup
Geoffrey Métais
git at videolan.org
Wed Nov 8 10:09:03 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Nov 8 10:06:29 2017 +0100| [73035f276fb7c93f07f65936cc5f3b3613b04874] | committer: Geoffrey Métais
Video player: prevent NPE on switch to popup
> https://code.videolan.org/videolan/vlc-android/commit/73035f276fb7c93f07f65936cc5f3b3613b04874
---
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 cd5732057..23d671b86 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -596,7 +596,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
@TargetApi(Build.VERSION_CODES.N)
public void switchToPopup() {
- final MediaWrapper mw = mService.getCurrentMediaWrapper();
+ final MediaWrapper mw = mService != null ? mService.getCurrentMediaWrapper() : null;
if (mw == null)
return;
if (AndroidDevices.hasPiP) {
More information about the Android
mailing list