[epiphany/mcatanzaro/#875] notebook: Disconnect from embed when removing tab



commit 712b46b829b8b9b0816c4e2f2c99616337c2f9ab
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Aug 10 11:05:03 2019 -0500

    notebook: Disconnect from embed when removing tab
    
    This hopefully fixes #875.
    
    Also, add an assert to ensure title_changed_cb() isn't called after the
    embed has already been removed.

 src/ephy-notebook.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index c69e836d3..b75b6a860 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -687,6 +687,7 @@ title_changed_cb (EphyEmbed    *embed,
     return;
 
   tab_label = gtk_notebook_get_tab_label (GTK_NOTEBOOK (notebook), GTK_WIDGET (embed));
+  g_assert (tab_label);
 
   ephy_notebook_rebuild_tab_menu (notebook);
 
@@ -868,6 +869,8 @@ ephy_notebook_remove (GtkContainer *container,
     smart_tab_switching_on_closure (notebook, tab_widget);
   }
 
+  g_signal_handlers_disconnect_by_data (tab_widget, notebook);
+
   GTK_CONTAINER_CLASS (ephy_notebook_parent_class)->remove (container, tab_widget);
 
   update_tabs_visibility (notebook, FALSE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]