aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 2497d2f77..e7c48d010 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-11 James Henstridge <james@jamesh.id.au>
* src/ephy-extensions-manager.c (load_file_from_monitor): make len
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 ();
}