Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2276)

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 8416023: RenderWidgetHostView: Fix a crash that occurrs when the TabContents is being (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 21bae6ca6d487098015c1e9d2234781ac7989818..ade9a9f7c352a43361afbb5b531a9e9298c9160a 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -331,7 +331,11 @@ void RenderWidgetHostViewWin::DidBecomeSelected() {
tab_switch_paint_time_ = TimeTicks::Now();
is_hidden_ = false;
EnsureTooltip();
- render_widget_host_->WasRestored();
+
+ // |render_widget_host_| may be NULL if the TabContents is in the process of
+ // closing.
+ if (render_widget_host_)
+ render_widget_host_->WasRestored();
}
void RenderWidgetHostViewWin::WasHidden() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698