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

Unified Diff: chrome/views/custom_frame_window.cc

Issue 20051: Paper over a crash that I think is due to the way we shut down the view hiera... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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: chrome/views/custom_frame_window.cc
===================================================================
--- chrome/views/custom_frame_window.cc (revision 9058)
+++ chrome/views/custom_frame_window.cc (working copy)
@@ -674,6 +674,13 @@
void DefaultNonClientView::PaintTitleBar(ChromeCanvas* canvas) {
WindowDelegate* d = container_->window_delegate();
+
+ // It seems like in some conditions we can be asked to paint after the window
+ // that contains us is WM_DESTROYed. At this point, our delegate is NULL. The
+ // correct long term fix may be to shut down the RootView in WM_DESTROY.
+ if (!d)
+ return;
+
canvas->DrawStringInt(d->GetWindowTitle(), title_font_, SK_ColorWHITE,
MirroredLeftPointForRect(title_bounds_), title_bounds_.y(),
title_bounds_.width(), title_bounds_.height());
« 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