aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-11 20:55:55 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-11 20:55:55 +0800
commit2fda19d3c36dbc38f0494715c07f495ac75a90e0 (patch)
treed2140a16f8416cf084cf107cc7124caa2bff0b43 /src
parent9dfacae0cdadd0125e80fca0b253c80b227839ab (diff)
downloadgsoc2013-epiphany-2fda19d3c36dbc38f0494715c07f495ac75a90e0.tar
gsoc2013-epiphany-2fda19d3c36dbc38f0494715c07f495ac75a90e0.tar.gz
gsoc2013-epiphany-2fda19d3c36dbc38f0494715c07f495ac75a90e0.tar.bz2
gsoc2013-epiphany-2fda19d3c36dbc38f0494715c07f495ac75a90e0.tar.lz
gsoc2013-epiphany-2fda19d3c36dbc38f0494715c07f495ac75a90e0.tar.xz
gsoc2013-epiphany-2fda19d3c36dbc38f0494715c07f495ac75a90e0.tar.zst
gsoc2013-epiphany-2fda19d3c36dbc38f0494715c07f495ac75a90e0.zip
Don't unref, then weak ref, then enter main loop; this won't work when
2004-11-11 Christian Persch <chpe@cvs.gnome.org> * src/ephy-main.c: (idle_unref), (main): Don't unref, then weak ref, then enter main loop; this won't work when refcount was 1. Instead weakref and unref on idle. Fixes bug #136170.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index ad5e3cb32..e6b9e8ed0 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -83,6 +83,13 @@ shell_weak_notify (gpointer data,
gtk_main_quit ();
}
+static gboolean
+idle_unref (GObject *object)
+{
+ g_object_unref (object);
+ return FALSE;
+}
+
int
main (int argc, char *argv[])
{
@@ -185,9 +192,8 @@ main (int argc, char *argv[])
}
else if (new_instance)
{
- g_object_unref (ephy_shell);
-
g_object_weak_ref (G_OBJECT (ephy_shell), shell_weak_notify, NULL);
+ g_idle_add ((GSourceFunc) idle_unref, ephy_shell);
gtk_main ();
}