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
1 changed files with 6 additions and 2 deletions

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);