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 {
|
||||
if webView != nil {
|
||||
webView.removeFromSuperview()
|
||||
ArticleViewControllerWebViewProvider.shared.enqueueWebView(webView)
|
||||
webView = nil
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
|
Loading…
Reference in New Issue