aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-12 01:56:44 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-12 01:56:44 +0800
commitbd066da5d8edf4d71c872bdaec86621c13145237 (patch)
treef26dd7ac36eb922c82878e11f93897e2d0e111c5
parent7592d35abb3e72e4318f4a767922a5a0f263b7ad (diff)
downloadgsoc2013-epiphany-bd066da5d8edf4d71c872bdaec86621c13145237.tar.gz
gsoc2013-epiphany-bd066da5d8edf4d71c872bdaec86621c13145237.tar.zst
gsoc2013-epiphany-bd066da5d8edf4d71c872bdaec86621c13145237.zip
Keep a ref on EphyShell in ephy_session_close(). Otherwise we get a crash
2004-11-11 Christian Persch <chpe@cvs.gnome.org> * src/ephy-session.c: (ephy_session_close): Keep a ref on EphyShell in ephy_session_close(). Otherwise we get a crash when the session manager sends us the "die" signal, and we don't have a tool window (bme, history) open.
-rw-r--r--ChangeLog8
-rw-r--r--src/ephy-session.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c851cdd1..ac4a69642 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2004-11-11 Christian Persch <chpe@cvs.gnome.org>
+ * src/ephy-session.c: (ephy_session_close):
+
+ Keep a ref on EphyShell in ephy_session_close(). Otherwise we
+ get a crash when the session manager sends us the "die" signal,
+ and we don't have a tool window (bme, history) open.
+
+2004-11-11 Christian Persch <chpe@cvs.gnome.org>
+
* embed/ephy-history.c: (remove_obsolete_pages):
* src/bookmarks/ephy-bookmarks.c: (clear_favorites):
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 13fad9ccb..d5297e285 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -444,6 +444,11 @@ ephy_session_close (EphySession *session)
LOG ("ephy_session_close")
+ /* we have to ref the shell or else we may get finalised between
+ * destroying the windows and destroying the tool windows
+ */
+ g_object_ref (ephy_shell);
+
windows = ephy_session_get_windows (session);
g_list_foreach (windows, (GFunc) gtk_widget_destroy, NULL);
g_list_free (windows);
@@ -451,6 +456,8 @@ ephy_session_close (EphySession *session)
windows = g_list_copy (session->priv->tool_windows);
g_list_foreach (windows, (GFunc) gtk_widget_destroy, NULL);
g_list_free (windows);
+
+ g_object_unref (ephy_shell);
}
static int