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

Unified Diff: views/window/dialog_client_view.cc

Issue 119183: Fix crash 12519: in views::DialogClientView::AcceptWindow()... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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: views/window/dialog_client_view.cc
===================================================================
--- views/window/dialog_client_view.cc (revision 17574)
+++ views/window/dialog_client_view.cc (working copy)
@@ -369,6 +369,11 @@
// 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_) {
« 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