| Index: chrome/browser/ui/gtk/bubble/bubble_gtk.cc
|
| diff --git a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
|
| index 4ffee09feb9ff5c5eb682603ba85cbf39077d797..a030450584615b44d00fb0dce9e23dea17ec1e08 100644
|
| --- a/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
|
| +++ b/chrome/browser/ui/gtk/bubble/bubble_gtk.cc
|
| @@ -186,16 +186,15 @@ void BubbleGtk::Init(GtkWidget* anchor_widget,
|
| signals_.Connect(anchor_widget_, "size-allocate",
|
| G_CALLBACK(OnAnchorAllocateThunk), this);
|
| signals_.Connect(anchor_widget_, "destroy",
|
| - G_CALLBACK(gtk_widget_destroyed), &anchor_widget_);
|
| + G_CALLBACK(OnAnchorDestroyThunk), this);
|
| }
|
|
|
| signals_.Connect(toplevel_window_, "configure-event",
|
| G_CALLBACK(OnToplevelConfigureThunk), this);
|
| signals_.Connect(toplevel_window_, "unmap-event",
|
| G_CALLBACK(OnToplevelUnmapThunk), this);
|
| - // Set |toplevel_window_| to NULL if it gets destroyed.
|
| - signals_.Connect(toplevel_window_, "destroy",
|
| - G_CALLBACK(gtk_widget_destroyed), &toplevel_window_);
|
| + signals_.Connect(window_, "destroy",
|
| + G_CALLBACK(OnToplevelDestroyThunk), this);
|
|
|
| gtk_widget_show_all(window_);
|
|
|
| @@ -668,3 +667,15 @@ void BubbleGtk::OnAnchorAllocate(GtkWidget* widget,
|
| if (!UpdateArrowLocation(false))
|
| MoveWindow();
|
| }
|
| +
|
| +void BubbleGtk::OnAnchorDestroy(GtkWidget* widget) {
|
| + anchor_widget_ = NULL;
|
| + Close();
|
| + // |this| is deleted.
|
| +}
|
| +
|
| +void BubbleGtk::OnToplevelDestroy(GtkWidget* widget) {
|
| + toplevel_window_ = NULL;
|
| + Close();
|
| + // |this| is deleted.
|
| +}
|
|
|