aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-17 06:57:51 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-17 06:57:51 +0800
commit4b2d6b0b8b33720095be83c2604248b9940e9be5 (patch)
tree9215d25ca7394cdd5b0957c34d858de916647ec4 /src
parent33f7064755504d852085e872c57e77759b04db5a (diff)
downloadgsoc2013-epiphany-4b2d6b0b8b33720095be83c2604248b9940e9be5.tar
gsoc2013-epiphany-4b2d6b0b8b33720095be83c2604248b9940e9be5.tar.gz
gsoc2013-epiphany-4b2d6b0b8b33720095be83c2604248b9940e9be5.tar.bz2
gsoc2013-epiphany-4b2d6b0b8b33720095be83c2604248b9940e9be5.tar.lz
gsoc2013-epiphany-4b2d6b0b8b33720095be83c2604248b9940e9be5.tar.xz
gsoc2013-epiphany-4b2d6b0b8b33720095be83c2604248b9940e9be5.tar.zst
gsoc2013-epiphany-4b2d6b0b8b33720095be83c2604248b9940e9be5.zip
Ref the child before removing it, and unref it after emitting the
2003-06-16 Christian Persch <chpe@cvs.gnome.org> * src/ephy-notebook.c: (ephy_notebook_remove_page): Ref the child before removing it, and unref it after emitting the tabs_removed signal. That way it stays alive while the signal is being processed. Fixes bug 115306.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-notebook.c11
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);
}