[Android] Avoid NPE
Geoffrey Métais
git at videolan.org
Mon Jun 13 15:21:04 CEST 2016
vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jun 13 14:57:30 2016 +0200| [3f996a31cd37a7a69fde99371197bc40cc53af96] | committer: Geoffrey Métais
Avoid NPE
(cherry picked from commit 07ce434b2174be5224cb9a3c853c488c610d6643)
> https://code.videolan.org/videolan/vlc-android/commit/3f996a31cd37a7a69fde99371197bc40cc53af96
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
index 061c7a2..695de7c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
@@ -187,7 +187,7 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
mResumeToVideo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (mService != null) {
+ if (mService != null && mService.hasMedia()) {
mService.getCurrentMediaWrapper().removeFlags(MediaWrapper.MEDIA_FORCE_AUDIO);
mService.switchToVideo();
}
More information about the Android
mailing list