Fix a bug where clicking a media button outside the media player would crash