Commit efe3a4bb authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent rare NPE in AudioPlayer

parent 2e003355
......@@ -483,12 +483,14 @@ public class AudioPlayer extends Fragment implements IAudioPlayer {
public void show() {
MainActivity activity = (MainActivity)getActivity();
activity.showAudioPlayer();
if (activity != null)
activity.showAudioPlayer();
}
public void hide() {
MainActivity activity = (MainActivity)getActivity();
activity.hideAudioPlayer();
if (activity != null)
activity.hideAudioPlayer();
}
/**
......
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