1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-11 11:19:54 +01:00

Fix NullPointerException when sharing a playlist which is loading

Prevent a NullPointerException by adding a null check for currentInfo when sharing a playlist.
This commit is contained in:
TiA4f8R 2022-01-15 21:19:04 +01:00
parent 9ff1baefde
commit 6672169707
No known key found for this signature in database
GPG Key ID: E6D3E7F5949450DD

View File

@ -268,7 +268,10 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
ShareUtils.openUrlInBrowser(requireContext(), url); ShareUtils.openUrlInBrowser(requireContext(), url);
break; break;
case R.id.menu_item_share: case R.id.menu_item_share:
ShareUtils.shareText(requireContext(), name, url, currentInfo.getThumbnailUrl()); if (currentInfo != null) {
ShareUtils.shareText(requireContext(), name, url,
currentInfo.getThumbnailUrl());
}
break; break;
case R.id.menu_item_bookmark: case R.id.menu_item_bookmark:
onBookmarkClicked(); onBookmarkClicked();