diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java index d77935910..4efba9277 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java @@ -79,17 +79,17 @@ public class ExternalPlayerFragment extends Fragment { public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); butPlay.setOnClickListener(v -> { - if (controller != null) { - if (controller.getMedia().getMediaType() == MediaType.VIDEO - && controller.getStatus() != PlayerStatus.PLAYING) { - controller.playPause(); - getContext().startActivity(PlaybackService - .getPlayerActivityIntent(getContext(), controller.getMedia())); - } else { - controller.playPause(); - } + if (controller == null) { + return; + } + if (controller.getMedia() != null && controller.getMedia().getMediaType() == MediaType.VIDEO + && controller.getStatus() != PlayerStatus.PLAYING) { + controller.playPause(); + getContext().startActivity(PlaybackService + .getPlayerActivityIntent(getContext(), controller.getMedia())); + } else { + controller.playPause(); } - }); loadMediaInfo(); }