Merge pull request #1133 from TomHennen/fixnpe_mediaplayer
fix npe in media player
This commit is contained in:
commit
f7edc797ae
|
@ -256,7 +256,7 @@ public abstract class MediaplayerActivity extends ActionBarActivity
|
||||||
((FeedMedia) media).getItem().getFlattrStatus().flattrable()
|
((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);
|
menu.findItem(R.id.visit_website_item).setVisible(hasWebsiteLink);
|
||||||
|
|
||||||
boolean isItemAndHasLink = media != null && (media instanceof FeedMedia) && ((FeedMedia) media).getItem().getLink() != null;
|
boolean isItemAndHasLink = media != null && (media instanceof FeedMedia) && ((FeedMedia) media).getItem().getLink() != null;
|
||||||
|
|
Loading…
Reference in New Issue