Commit cc5bbad8 authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent NPE in PlaybackSpeedDialog

parent 5d88c8fa
......@@ -131,10 +131,7 @@ public class PlaybackSpeedDialog extends DialogFragment implements PlaybackServi
private View.OnClickListener mResetListener = new View.OnClickListener() {
public void onClick(View v) {
if (mService == null)
if (mService.getRate() == 1.0d)
if (mService == null || mService.getRate() == 1.0d || mService.getCurrentMediaWrapper() == null)
mService.setRate(1F, mService.getCurrentMediaWrapper().getType() == MediaWrapper.TYPE_AUDIO);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment