aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
index de4e414b..b76f0134 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
@@ -211,10 +211,7 @@ class FrostWebView @JvmOverloads constructor(
}
override fun destroy() {
- val parent = getParent() as? ViewGroup
- if (parent != null) {
- parent.removeView(this)
- super.destroy()
- }
+ (getParent() as? ViewGroup)?.removeView(this)
+ super.destroy()
}
}