diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 20:06:26 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 20:06:26 +0000 |
commit | b6ecfa38ff76e5353f96963c050901f8c5fa546e (patch) | |
tree | 2fe69077ade678148bcd454acd753d092b41cb56 /chrome | |
parent | f1de3486f3bb4f252b9b5f2384c9e5678d4e1e06 (diff) | |
download | chromium_src-b6ecfa38ff76e5353f96963c050901f8c5fa546e.zip chromium_src-b6ecfa38ff76e5353f96963c050901f8c5fa546e.tar.gz chromium_src-b6ecfa38ff76e5353f96963c050901f8c5fa546e.tar.bz2 |
Paper over a crash that I think is due to the way we shut down the view hierarchy in a window.
http://crbug.com/6260
Review URL: http://codereview.chromium.org/20051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/custom_frame_window.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/views/custom_frame_window.cc b/chrome/views/custom_frame_window.cc index e80c384..2cf6ccd 100644 --- a/chrome/views/custom_frame_window.cc +++ b/chrome/views/custom_frame_window.cc @@ -674,6 +674,13 @@ void DefaultNonClientView::PaintMaximizedFrameBorder( 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()); |