For #17635: Check if id corresponds to a custom tab before removing it.

This commit is contained in:
mcarare 2021-01-26 16:38:36 +02:00 committed by Christian Sadilek
parent 87d6f32374
commit 278ed658b6
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,8 @@ open class ExternalAppBrowserActivity : HomeActivity() {
// exists then remove it now to free all its resources. Once this activity is finished
// then there's no way to get back to it other than relaunching it.
val tabId = getExternalTabId()
if (tabId != null) {
val customTab = tabId?.let { components.core.store.state.findCustomTab(it) }
if (tabId != null && customTab != null) {
components.useCases.customTabsUseCases.remove(tabId)
}
}