summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 20:11:15 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 20:11:15 +0000
commit19dfbb20957a02fae1374747e7df62d5b7fcb107 (patch)
tree721cf249751fdb330c3087d5f0d9ceb4c1be3e13 /chrome/views
parent3334b7d18136ec0da16ea24e40373f2da75c0e4d (diff)
downloadchromium_src-19dfbb20957a02fae1374747e7df62d5b7fcb107.zip
chromium_src-19dfbb20957a02fae1374747e7df62d5b7fcb107.tar.gz
chromium_src-19dfbb20957a02fae1374747e7df62d5b7fcb107.tar.bz2
Bail saving window placement if the function is called after WM_DESTROY (window_delegate_ is NULL).
http://crbug.com/6376 Review URL: http://codereview.chromium.org/21004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/window.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc
index 11e07f2b..e690a04 100644
--- a/chrome/views/window.cc
+++ b/chrome/views/window.cc
@@ -637,6 +637,13 @@ DWORD Window::CalculateWindowExStyle() {
}
void Window::SaveWindowPosition() {
+ // The window delegate does the actual saving for us. It seems like (judging
+ // by go/crash) that in some circumstances we can end up here after
+ // WM_DESTROY, at which point the window delegate is likely gone. So just
+ // bail.
+ if (!window_delegate_)
+ return;
+
WINDOWPLACEMENT win_placement = { 0 };
win_placement.length = sizeof(WINDOWPLACEMENT);