fix: guard mpv event handler during disposal

This commit is contained in:
edde746
2026-03-12 02:44:50 +01:00
parent a17458ff9b
commit f04b49e260
@@ -361,6 +361,7 @@ class MpvPlayerCore(private val activity: Activity) :
}
override fun event(eventId: Int) {
if (disposing) return
when (eventId) {
MPVLib.MPV_EVENT_END_FILE -> {
val eofReached = try { MPVLib.getPropertyBoolean("eof-reached") } catch (_: Exception) { false }