Merge pull request #3916 from Bnyro/master

Fix crash when long pressing share while loading
This commit is contained in:
Bnyro 2023-06-03 21:48:21 +02:00 committed by GitHub
commit f347affb1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -448,7 +448,8 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
} }
binding.relPlayerShare.setOnLongClickListener { 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 // start an intent with video as mimetype using the hls stream
val uri = Uri.parse(ProxyHelper.unwrapIfEnabled(streams.hls!!)) val uri = Uri.parse(ProxyHelper.unwrapIfEnabled(streams.hls!!))