Merge pull request #6190 from Bnyro/master

fix: crash when destroying activity after media session
This commit is contained in:
Bnyro 2024-06-30 17:14:21 +02:00 committed by GitHub
commit 2f1dea38c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -346,7 +346,7 @@ class NowPlayingNotification(
* Destroy the [NowPlayingNotification] * Destroy the [NowPlayingNotification]
*/ */
fun destroySelf() { fun destroySelf() {
mediaSession.release() if (this::mediaSession.isInitialized) mediaSession.release()
nManager.cancel(NotificationId.PLAYER_PLAYBACK.id) nManager.cancel(NotificationId.PLAYER_PLAYBACK.id)
} }