Avoid rare crash in WebViewActivity

(cherry picked from commit 27cec697bf6252bfe9ae3244a702a235586e2110)
This commit is contained in:
arkon 2021-04-17 12:22:58 -04:00 committed by Jobobby04
parent 1b0b98b140
commit 707af702c1

View File

@ -139,8 +139,10 @@ class WebViewActivity : BaseViewBindingActivity<WebviewActivityBinding>() {
}
override fun onDestroy() {
binding.webview?.destroy()
super.onDestroy()
// Binding sometimes isn't actually instantiated yet somehow
binding?.webview?.destroy()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {