fix: crash when destroying activity after media session

This commit is contained in:
Bnyro 2024-06-30 17:14:00 +02:00
parent ef1daa005f
commit 4834650f81

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)
} }