mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-22 23:00:56 +01:00
Merge pull request #5149 from ByteHamster/fix-npe
Fixed NPE in ExternalPlayerFragment
This commit is contained in:
commit
4b1d743ba2
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user