[Android] Prevent NPE in PlaybackSpeedDialog
Geoffrey Métais
git at videolan.org
Fri Oct 13 15:47:50 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct 13 09:31:26 2017 +0200| [3cbfb6386fc5cc2fd489afc85ce39065067471f0] | committer: Geoffrey Métais
Prevent NPE in PlaybackSpeedDialog
> https://code.videolan.org/videolan/vlc-android/commit/3cbfb6386fc5cc2fd489afc85ce39065067471f0
---
vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.java
index f0fd1ade5..d149710c1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.java
@@ -100,7 +100,7 @@ public class PlaybackSpeedDialog extends DialogFragment implements PlaybackServi
private SeekBar.OnSeekBarChangeListener mSeekBarListener = new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- if (mService == null)
+ if (mService == null || mService.getCurrentMediaWrapper() == null)
return;
if (fromUser) {
float rate = (float) Math.pow(4, ((double) progress / (double) 100) - 1);
More information about the Android
mailing list