Chromium Code Reviews| 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_) { |