Commit 9896419f authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent NPE

parent 1f99ff49
......@@ -290,7 +290,10 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
VLCApplication.runOnMainThread(new Runnable() {
@Override
public void run() {
if (((AudioPlayerContainerActivity)getActivity()).isAudioPlayerExpanded())
AudioPlayerContainerActivity activity = (AudioPlayerContainerActivity) getActivity();
if (activity == null)
return;
if (activity.isAudioPlayerExpanded())
mBinding.header.setBackgroundResource(0);
mBinding.backgroundView.setColorFilter(UiTools.getColorFromAttribute(mBinding.backgroundView.getContext(), R.attr.audio_player_background_tint));
mBinding.backgroundView.setImageBitmap(blurredCover);
......
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