Make sure the web view has been initialized before deallocating it.
This commit is contained in:
parent
fdfaa7416a
commit
4e6e61842a
|
@ -77,10 +77,12 @@ class ArticleViewController: UIViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
deinit {
|
deinit {
|
||||||
|
if webView != nil {
|
||||||
webView.removeFromSuperview()
|
webView.removeFromSuperview()
|
||||||
ArticleViewControllerWebViewProvider.shared.enqueueWebView(webView)
|
ArticleViewControllerWebViewProvider.shared.enqueueWebView(webView)
|
||||||
webView = nil
|
webView = nil
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
Loading…
Reference in New Issue