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