Merge pull request #3749 from Bnyro/master

Fix crash when closing player due to view bindings
This commit is contained in:
Bnyro 2023-05-10 19:48:10 +02:00 committed by GitHub
commit df7f533ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1128,7 +1128,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
*/
@SuppressLint("SetTextI18n")
private fun updateDisplayedDuration() {
if (exoPlayer.duration < 0 || streams.livestream) return
if (exoPlayer.duration < 0 || streams.livestream || _binding == null) return
playerBinding.duration.text = DateUtils.formatElapsedTime(
exoPlayer.duration.div(1000),