fix npe in media player

This commit is contained in:
Tom Hennen 2015-08-26 18:17:20 -04:00
parent b3719199f8
commit 9efe4f6eff
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity
((FeedMedia) media).getItem().getFlattrStatus().flattrable()
);
boolean hasWebsiteLink = media.getWebsiteLink() != null;
boolean hasWebsiteLink = media != null && media.getWebsiteLink() != null;
menu.findItem(R.id.visit_website_item).setVisible(hasWebsiteLink);
boolean isItemAndHasLink = media != null && (media instanceof FeedMedia) && ((FeedMedia) media).getItem().getLink() != null;