diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt index 4b22a91af..c27101c4d 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt @@ -448,7 +448,8 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { } binding.relPlayerShare.setOnLongClickListener { - streams.hls ?: return@setOnLongClickListener true + if (!this::streams.isInitialized || streams.hls == null) + return@setOnLongClickListener true // start an intent with video as mimetype using the hls stream val uri = Uri.parse(ProxyHelper.unwrapIfEnabled(streams.hls!!))