Skip to content
Snippets Groups Projects
Commit bb2c7a5c authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Prevent NPE in PlaybackSpeedDialog

(cherry picked from commit cc5bbad8)
parent 76170758
No related branches found
No related tags found
No related merge requests found
......@@ -131,10 +131,7 @@ public class PlaybackSpeedDialog extends DialogFragment implements PlaybackServi
private View.OnClickListener mResetListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mService == null)
return;
if (mService.getRate() == 1.0d)
if (mService == null || mService.getRate() == 1.0d || mService.getCurrentMediaWrapper() == null)
return;
mService.setRate(1F, mService.getCurrentMediaWrapper().getType() == MediaWrapper.TYPE_AUDIO);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment