aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-10-14 23:45:10 -0700
committerAllan Wang <me@allanwang.ca>2019-10-14 23:45:10 -0700
commit4f7ba30690438d69c75c92530e7a78bd20fa9a24 (patch)
tree26b59a328544519123dbfe5ce20934fef0cd4696 /app/src/main
parentc129a7595e4a05f87befa8a9e3cef316bb614f47 (diff)
downloadfrost-4f7ba30690438d69c75c92530e7a78bd20fa9a24.tar.gz
frost-4f7ba30690438d69c75c92530e7a78bd20fa9a24.tar.bz2
frost-4f7ba30690438d69c75c92530e7a78bd20fa9a24.zip
Enforce super destroy for webviews
Diffstat (limited to 'app/src/main')
-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()
}
}