Fix crash (#200)

This commit is contained in:
Damontecres 2025-11-11 21:41:24 -05:00
parent 96c856e8fc
commit 9b60c00180
No known key found for this signature in database

View file

@ -243,8 +243,8 @@ class MpvPlayer(
} }
override fun getPlayWhenReady(): Boolean { override fun getPlayWhenReady(): Boolean {
throwIfReleased()
if (DEBUG) Timber.v("getPlayWhenReady") if (DEBUG) Timber.v("getPlayWhenReady")
if (isReleased) return false
val isPaused = MPVLib.getPropertyBoolean("pause") ?: this.isPaused val isPaused = MPVLib.getPropertyBoolean("pause") ?: this.isPaused
return !isPaused return !isPaused
} }