[Android] AudioService: fix possible crash if media is stopped just after open

Thomas Guillem git at videolan.org
Wed Jan 21 15:59:14 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 21 15:57:48 2015 +0100| [bbe9d2bc76bbd3d3a2c81f0a8f90bd5557082889] | committer: Thomas Guillem

AudioService: fix possible crash if media is stopped just after open

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

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

diff --git a/vlc-android/src/org/videolan/vlc/audio/AudioService.java b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
index b2080be..227a853 100644
--- a/vlc-android/src/org/videolan/vlc/audio/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
@@ -539,6 +539,8 @@ public class AudioService extends Service {
                     // avoid useless error logs
                     break;
                 case EventHandler.MediaMetaChanged:
+                    if (!service.hasCurrentMedia())
+                        break;
                     service.getCurrentMedia().updateMeta(service.mLibVLC);
                     service.setUpRemoteControlClient();
                     service.executeUpdate();



More information about the Android mailing list