diff --git a/app/src/main/java/me/timschneeberger/rootlessjamesdsp/session/rootless/RootlessSessionDatabase.kt b/app/src/main/java/me/timschneeberger/rootlessjamesdsp/session/rootless/RootlessSessionDatabase.kt index 790d02244..f69295f12 100644 --- a/app/src/main/java/me/timschneeberger/rootlessjamesdsp/session/rootless/RootlessSessionDatabase.kt +++ b/app/src/main/java/me/timschneeberger/rootlessjamesdsp/session/rootless/RootlessSessionDatabase.kt @@ -50,8 +50,14 @@ class RootlessSessionDatabase(context: Context) : BaseSessionDatabase(context) { override fun onSessionRemoved(item: IEffectSession) { (item as MutedEffectSession).run { - audioMuteEffect?.enabled = false - audioMuteEffect?.release() + try { + audioMuteEffect?.enabled = false + audioMuteEffect?.release() + } + catch (ex: Exception) { + Timber.e("onSessionRemoved: effect already destroyed") + Timber.d(ex) + } } }