Index: chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc |
=================================================================== |
--- chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc (revision 102206) |
+++ chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc (working copy) |
@@ -82,16 +82,22 @@ |
} |
void ConfirmInfoBarGtk::OnOkButton(GtkWidget* widget) { |
+ if (!owned()) |
+ return; // We're closing; don't call anything, it might access the owner. |
if (delegate()->AsConfirmInfoBarDelegate()->Accept()) |
RemoveSelf(); |
} |
void ConfirmInfoBarGtk::OnCancelButton(GtkWidget* widget) { |
+ if (!owned()) |
+ return; // We're closing; don't call anything, it might access the owner. |
if (delegate()->AsConfirmInfoBarDelegate()->Cancel()) |
RemoveSelf(); |
} |
void ConfirmInfoBarGtk::OnLinkClicked(GtkWidget* widget) { |
+ if (!owned()) |
+ return; // We're closing; don't call anything, it might access the owner. |
if (delegate()->AsConfirmInfoBarDelegate()->LinkClicked( |
gtk_util::DispositionForCurrentButtonPressEvent())) |
RemoveSelf(); |