Avoid rare crash in WebViewActivity

This commit is contained in:
arkon 2021-04-17 12:22:58 -04:00
parent 024f9a8c76
commit 27cec697bf

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 {