diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-11-12 01:56:44 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-11-12 01:56:44 +0800 |
commit | bd066da5d8edf4d71c872bdaec86621c13145237 (patch) | |
tree | f26dd7ac36eb922c82878e11f93897e2d0e111c5 /src/ephy-session.c | |
parent | 7592d35abb3e72e4318f4a767922a5a0f263b7ad (diff) | |
download | gsoc2013-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.
Diffstat (limited to 'src/ephy-session.c')
-rw-r--r-- | src/ephy-session.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 |