diff options
author | Allan Wang <me@allanwang.ca> | 2019-10-14 23:45:10 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-10-14 23:45:10 -0700 |
commit | 4f7ba30690438d69c75c92530e7a78bd20fa9a24 (patch) | |
tree | 26b59a328544519123dbfe5ce20934fef0cd4696 /app/src/main/kotlin/com/pitchedapps | |
parent | c129a7595e4a05f87befa8a9e3cef316bb614f47 (diff) | |
download | frost-4f7ba30690438d69c75c92530e7a78bd20fa9a24.tar.gz frost-4f7ba30690438d69c75c92530e7a78bd20fa9a24.tar.bz2 frost-4f7ba30690438d69c75c92530e7a78bd20fa9a24.zip |
Enforce super destroy for webviews
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt | 7 |
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() } } |