Merge pull request #1133 from TomHennen/fixnpe_mediaplayer

fix npe in media player
This commit is contained in:
Tom Hennen 2015-08-26 18:27:19 -04:00
commit f7edc797ae
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;