aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog8
-rw-r--r--src/ephy-main.c10
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index dca3e526b..a3066e260 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2004-11-10 Christian Persch <chpe@cvs.gnome.org>
* embed/downloader-view.c: (update_status_icon):
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 ();
}