diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-11-11 20:52:20 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-11-11 20:52:20 +0800 |
commit | bfdc6be6ad7688c6884ad4fb208a9943b06230f7 (patch) | |
tree | 7e1ef9020005bf7c84d94481336bf1cce1e700c0 /src/ephy-main.c | |
parent | dc701761a20235890c5972fe7856da39a1bfb376 (diff) | |
download | gsoc2013-epiphany-bfdc6be6ad7688c6884ad4fb208a9943b06230f7.tar gsoc2013-epiphany-bfdc6be6ad7688c6884ad4fb208a9943b06230f7.tar.gz gsoc2013-epiphany-bfdc6be6ad7688c6884ad4fb208a9943b06230f7.tar.bz2 gsoc2013-epiphany-bfdc6be6ad7688c6884ad4fb208a9943b06230f7.tar.lz gsoc2013-epiphany-bfdc6be6ad7688c6884ad4fb208a9943b06230f7.tar.xz gsoc2013-epiphany-bfdc6be6ad7688c6884ad4fb208a9943b06230f7.tar.zst gsoc2013-epiphany-bfdc6be6ad7688c6884ad4fb208a9943b06230f7.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/ephy-main.c')
-rw-r--r-- | src/ephy-main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index 7f8dc617b..98d71f1c6 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -77,6 +77,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[]) { @@ -178,9 +185,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 (); } |