diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-11-11 20:55:55 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-11-11 20:55:55 +0800 |
commit | 2fda19d3c36dbc38f0494715c07f495ac75a90e0 (patch) | |
tree | d2140a16f8416cf084cf107cc7124caa2bff0b43 | |
parent | 9dfacae0cdadd0125e80fca0b253c80b227839ab (diff) | |
download | gsoc2013-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-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/ephy-main.c | 10 |
2 files changed, 16 insertions, 2 deletions
@@ -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 (); } |