1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-25 22:53:20 +00:00

null check on share

This commit is contained in:
yausername 2019-12-03 02:04:52 +05:30
parent 890d1cb50b
commit 17c5e73994
No known key found for this signature in database
GPG Key ID: F946F508AA241678

View File

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