[Android] VideoPlayer: Fix potential NPE
Geoffrey Métais
git at videolan.org
Tue Jan 8 11:26:57 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 7 17:53:30 2019 +0100| [cb333466e8a64705bdb8d585e2d745b1eee028d2] | committer: Geoffrey Métais
VideoPlayer: Fix potential NPE
> https://code.videolan.org/videolan/vlc-android/commit/cb333466e8a64705bdb8d585e2d745b1eee028d2
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 4 +++-
1 file changed, 3 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 cf6cf0394..14a8184e1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1525,8 +1525,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
};
private void onPlaying() {
+ final PlaybackService service = mService;
+ if (service == null) return;
mIsPlaying = true;
- final MediaWrapper mw = mService.getCurrentMediaWrapper();
+ final MediaWrapper mw = service.getCurrentMediaWrapper();
if (mw == null) return;
setPlaybackParameters();
stopLoading();
More information about the Android
mailing list