Index: chrome/browser/gtk/infobar_container_gtk.cc |
=================================================================== |
--- chrome/browser/gtk/infobar_container_gtk.cc (revision 65711) |
+++ chrome/browser/gtk/infobar_container_gtk.cc (working copy) |
@@ -123,12 +123,12 @@ |
} else if (type == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED) { |
RemoveInfoBar(Details<InfoBarDelegate>(details).ptr(), true); |
} else if (type == NotificationType::TAB_CONTENTS_INFOBAR_REPLACED) { |
- std::pair<InfoBarDelegate*, InfoBarDelegate*>* delegates = |
- Details<std::pair<InfoBarDelegate*, InfoBarDelegate*> >(details).ptr(); |
+ typedef std::pair<InfoBarDelegate*, InfoBarDelegate*> DelegatePair; |
+ DelegatePair* delegate_pair = Details<DelegatePair>(details).ptr(); |
// By not animating the removal/addition, this appears to be a replace. |
- RemoveInfoBar(delegates->first, false); |
- AddInfoBar(delegates->second, false); |
+ RemoveInfoBar(delegate_pair->first, false); |
+ AddInfoBar(delegate_pair->second, false); |
} else { |
NOTREACHED(); |
} |
@@ -156,7 +156,7 @@ |
this_bar = reinterpret_cast<InfoBar*>( |
g_object_get_data(G_OBJECT(iter->data), kInfoBar)); |
- if (this_bar->delegate() == delegate) |
+ if ((delegate != NULL) && (this_bar->delegate() == delegate)) |
break; |
if (!this_bar->IsClosing()) |