[Android] Video player: Sanity check

Geoffrey Métais git at videolan.org
Fri Apr 12 15:02:04 CEST 2019


vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 12 13:18:02 2019 +0200| [9214bc37e72c50958b579aa015a8dc4e30cf3bcb] | committer: Geoffrey Métais

Video player: Sanity check

(cherry picked from commit 4229ea2c13fb090c08195b33b6aa591ec4a51274)

> https://code.videolan.org/videolan/vlc-android/commit/9214bc37e72c50958b579aa015a8dc4e30cf3bcb
---

 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 f6bceae8d..0ca5b6121 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1617,7 +1617,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
     private void handleVout(int voutCount) {
         mHandler.removeCallbacks(mSwitchAudioRunnable);
 
-        final IVLCVout vlcVout = mService.getVout();
+        final IVLCVout vlcVout = mService != null ? mService.getVout() : null;
         if (vlcVout == null) return;
         if (mDisplayManager.isPrimary() && vlcVout.areViewsAttached() && voutCount == 0) {
             mHandler.postDelayed(mSwitchAudioRunnable, 4000);



More information about the Android mailing list