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

Unified Diff: chrome/views/dialog_client_view.cc

Issue 40183: Guard against a crash that can impact Dialog boxes ... this one seems to have... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/dialog_client_view.cc
===================================================================
--- chrome/views/dialog_client_view.cc (revision 11029)
+++ chrome/views/dialog_client_view.cc (working copy)
@@ -309,6 +309,11 @@
// DialogClientView, NativeButton::Listener implementation:
void DialogClientView::ButtonPressed(NativeButton* 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())
Mark Larson 2009/03/06 00:34:40 Should this be !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