Commit 07ce434b authored by Geoffrey Métais's avatar Geoffrey Métais

Avoid NPE

parent b3316271
...@@ -187,7 +187,7 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ ...@@ -187,7 +187,7 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
mResumeToVideo.setOnClickListener(new View.OnClickListener() { mResumeToVideo.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (mService != null) { if (mService != null && mService.hasMedia()) {
mService.getCurrentMediaWrapper().removeFlags(MediaWrapper.MEDIA_FORCE_AUDIO); mService.getCurrentMediaWrapper().removeFlags(MediaWrapper.MEDIA_FORCE_AUDIO);
mService.switchToVideo(); mService.switchToVideo();
} }
......
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