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

Unified Diff: chrome/browser/ui/views/infobars/translate_message_infobar.cc

Issue 7981045: Make infobars ignore button clicks when closing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | « chrome/browser/ui/views/infobars/link_infobar.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/infobars/translate_message_infobar.cc
===================================================================
--- chrome/browser/ui/views/infobars/translate_message_infobar.cc (revision 103307)
+++ chrome/browser/ui/views/infobars/translate_message_infobar.cc (working copy)
@@ -57,6 +57,8 @@
void TranslateMessageInfoBar::ButtonPressed(views::Button* sender,
const views::Event& event) {
+ if (!owned())
+ return; // We're closing; don't call anything, it might access the owner.
if (sender == button_)
GetDelegate()->MessageInfoBarButtonPressed();
else
« no previous file with comments | « chrome/browser/ui/views/infobars/link_infobar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698