diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 19:47:11 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-04 19:47:11 +0000 |
commit | 7c616731ac7cd2cf542a3d41078f7b9c6dc869bd (patch) | |
tree | ecf44f8e59585a6266a042ce39614002653c74f9 /views/window | |
parent | f8488ed876cb8ace3e10a7d5e63a1a881a55b604 (diff) | |
download | chromium_src-7c616731ac7cd2cf542a3d41078f7b9c6dc869bd.zip chromium_src-7c616731ac7cd2cf542a3d41078f7b9c6dc869bd.tar.gz chromium_src-7c616731ac7cd2cf542a3d41078f7b9c6dc869bd.tar.bz2 |
Fix crash 12519: in views::DialogClientView::AcceptWindow()
We don't have repro steps for this crash so this
is a blind fix.
But looking at the function that crashes and the
history of this file I see:
Ben's r11070 and r11047: Which add this check.
Ben's r11132: Which removes this check (according
to the comments it is a test to see if we can get
away with it).
It looks to me like the check would prevent the
crash and since this is still crashing, I am
proposing we re-add it.
BUG=12519
TEST=We'll need to verify this by checking the
crash dumps sent from the field.
Review URL: http://codereview.chromium.org/119183
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r-- | views/window/dialog_client_view.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc index f59831e..b81e75f 100644 --- a/views/window/dialog_client_view.cc +++ b/views/window/dialog_client_view.cc @@ -369,6 +369,11 @@ bool DialogClientView::AcceleratorPressed(const Accelerator& accelerator) { // DialogClientView, ButtonListener implementation: void DialogClientView::ButtonPressed(Button* sender) { + // We NULL check the delegate here since the buttons can receive WM_COMMAND + // messages even after they (and the window containing us) are destroyed. + if (!GetDialogDelegate()) + return; + if (sender == ok_button_) { AcceptWindow(); } else if (sender == cancel_button_) { |