Skip to content

Commit

Permalink
Fix crash when web view delegate is nil after closing view controller…
Browse files Browse the repository at this point in the history
… and it tries to send a message to the delegate.
  • Loading branch information
weiran committed May 11, 2013
1 parent 2453f6c commit 8cc3290
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Hackers/WZWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ - (void)viewDidDisappear:(BOOL)animated {
_webView.scrollView.scrollsToTop = NO;
[self removeOrientationNotifications];
[[NSNotificationCenter defaultCenter] postNotificationName:WZWebViewControllerDismissed object:self];
[_webView stopLoading];
_webView.delegate = nil;
}

#pragma mark - Layout
Expand Down

0 comments on commit 8cc3290

Please sign in to comment.