[Android] Video player: prevent NPE
Geoffrey Métais
git at videolan.org
Fri Aug 3 15:38:28 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Aug 3 15:38:12 2018 +0200| [8bec47babd8ab286ed29e45225b97909baa013e7] | committer: Geoffrey Métais
Video player: prevent NPE
> https://code.videolan.org/videolan/vlc-android/commit/8bec47babd8ab286ed29e45225b97909baa013e7
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 3 ++-
1 file changed, 2 insertions(+), 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 38c8b1440..2a3d47fdf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1613,11 +1613,12 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
private void onPlaying() {
mIsPlaying = true;
+ final MediaWrapper mw = mService.getCurrentMediaWrapper();
+ if (mw == null) return;
setPlaybackParameters();
stopLoading();
updateOverlayPausePlay();
updateNavStatus();
- final MediaWrapper mw = mService.getCurrentMediaWrapper();
if (!mw.hasFlag(MediaWrapper.MEDIA_PAUSED))
mHandler.sendEmptyMessageDelayed(FADE_OUT, OVERLAY_TIMEOUT);
else {
More information about the Android
mailing list