mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-02-02 03:36:48 +01:00
Merge pull request #5149 from ByteHamster/fix-npe
Fixed NPE in ExternalPlayerFragment
This commit is contained in:
commit
4b1d743ba2
@ -79,8 +79,10 @@ 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
|
||||
if (controller == null) {
|
||||
return;
|
||||
}
|
||||
if (controller.getMedia() != null && controller.getMedia().getMediaType() == MediaType.VIDEO
|
||||
&& controller.getStatus() != PlayerStatus.PLAYING) {
|
||||
controller.playPause();
|
||||
getContext().startActivity(PlaybackService
|
||||
@ -88,8 +90,6 @@ public class ExternalPlayerFragment extends Fragment {
|
||||
} else {
|
||||
controller.playPause();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
loadMediaInfo();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user