[Android] Video player: Prevent NPE
Geoffrey Métais
git at videolan.org
Mon Jan 28 15:01:21 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 28 11:39:06 2019 +0100| [eceed758f8d6afc23099ba10ac4c961e15062e22] | committer: Geoffrey Métais
Video player: Prevent NPE
> https://code.videolan.org/videolan/vlc-android/commit/eceed758f8d6afc23099ba10ac4c961e15062e22
---
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 e828d8c07..1264fe7ca 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -749,7 +749,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
private void stopPlayback() {
if (!mPlaybackStarted) return;
- if (!mDisplayManager.isPrimary() && !isFinishing()) {
+ if (!mDisplayManager.isPrimary() && !isFinishing() || mService == null) {
mPlaybackStarted = false;
return;
}
More information about the Android
mailing list