diff options
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r-- | src/ephy-notebook.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 878807e14..6671ee3b3 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -1075,10 +1075,17 @@ ephy_notebook_remove_page (EphyNotebook *nb, g_signal_handlers_disconnect_by_func (label, G_CALLBACK (sync_load_status), tab); - - g_signal_emit (G_OBJECT (nb), signals[TAB_REMOVED], 0, child); + /** + * we ref the child so that it's still alive while the tabs_removed + * signal is processed. + */ + g_object_ref (child); gtk_notebook_remove_page (GTK_NOTEBOOK (nb), position); update_tabs_visibility (nb, FALSE); + + g_signal_emit (G_OBJECT (nb), signals[TAB_REMOVED], 0, child); + + g_object_unref (child); } |