aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-session.c')
-rw-r--r--src/ephy-session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 365cdc4be..bff2a1330 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -480,6 +480,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);
@@ -487,6 +492,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