[Android] Prevent NPE on rotation
Geoffrey Métais
git at videolan.org
Fri Feb 24 16:53:32 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 24 16:51:15 2017 +0100| [1673e4fc9ee4a1c7b10983cd7941f3221cf8f30e] | committer: Geoffrey Métais
Prevent NPE on rotation
> https://code.videolan.org/videolan/vlc-android/commit/1673e4fc9ee4a1c7b10983cd7941f3221cf8f30e
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java | 3 ++-
1 file changed, 2 insertions(+), 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 4be5b2a..3e60f54 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
@@ -713,7 +713,8 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
mBinding.header.setBackgroundResource(0);
setHeaderVisibilities(true, true, false, false, false, true);
showPlaylistTips();
- mPlaylistAdapter.setCurrentIndex(mService.getCurrentMediaPosition());
+ if (mService != null)
+ mPlaylistAdapter.setCurrentIndex(mService.getCurrentMediaPosition());
break;
default:
mBinding.header.setBackgroundResource(0);
More information about the Android
mailing list