Fix crash when long pressing share while loading

This commit is contained in:
Bnyro 2023-06-03 21:48:28 +02:00
parent a1b24d455a
commit dddb962d9e

View File

@ -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!!))