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) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
butPlay.setOnClickListener(v -> {
|
butPlay.setOnClickListener(v -> {
|
||||||
if (controller != null) {
|
if (controller == null) {
|
||||||
if (controller.getMedia().getMediaType() == MediaType.VIDEO
|
return;
|
||||||
&& controller.getStatus() != PlayerStatus.PLAYING) {
|
}
|
||||||
controller.playPause();
|
if (controller.getMedia() != null && controller.getMedia().getMediaType() == MediaType.VIDEO
|
||||||
getContext().startActivity(PlaybackService
|
&& controller.getStatus() != PlayerStatus.PLAYING) {
|
||||||
.getPlayerActivityIntent(getContext(), controller.getMedia()));
|
controller.playPause();
|
||||||
} else {
|
getContext().startActivity(PlaybackService
|
||||||
controller.playPause();
|
.getPlayerActivityIntent(getContext(), controller.getMedia()));
|
||||||
}
|
} else {
|
||||||
|
controller.playPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
loadMediaInfo();
|
loadMediaInfo();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user