1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-10-22 19:07:39 +00:00

null check on share

This commit is contained in:
yausername
2019-12-03 02:04:52 +05:30
parent 890d1cb50b
commit 17c5e73994

View File

@@ -179,10 +179,14 @@ public class ChannelFragment extends BaseListInfoFragment<ChannelInfo> {
openRssFeed();
break;
case R.id.menu_item_openInBrowser:
if (currentInfo != null) {
ShareUtils.openUrlInBrowser(this.getContext(), currentInfo.getOriginalUrl());
}
break;
case R.id.menu_item_share:
if (currentInfo != null) {
ShareUtils.shareUrl(this.getContext(), name, currentInfo.getOriginalUrl());
}
break;
default:
return super.onOptionsItemSelected(item);