[Android] PlaybackService: don't stop if mMediaPlayer is null

Thomas Guillem git at videolan.org
Wed Jul 8 09:31:41 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul  8 09:31:17 2015 +0200| [19a2cb01c59358abf41163ae9774bf290b641906] | committer: Thomas Guillem

PlaybackService: don't stop if mMediaPlayer is null

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=19a2cb01c59358abf41163ae9774bf290b641906
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index e2df097..7d6e10f 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -978,6 +978,8 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
 
     @MainThread
     public void stop() {
+        if (mMediaPlayer == null)
+            return;
         savePosition();
         final Media media = mMediaPlayer.getMedia();
         if (media != null) {



More information about the Android mailing list