[epiphany/mcatanzaro/#1043] session: keep window alive when parsing session
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/#1043] session: keep window alive when parsing session
- Date: Fri, 10 Jan 2020 20:24:08 +0000 (UTC)
commit 28e404a47c0bfd643e9dd2ce87120d4827936c0b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Jan 10 14:22:24 2020 -0600
session: keep window alive when parsing session
We can crash here if the window is destroyed immediately after starting
Epiphany, before we finish loading the session.
Fixes #1043
src/ephy-session.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index c5c05597b..081750b0c 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1099,6 +1099,8 @@ static void
session_parser_context_free (SessionParserContext *context)
{
g_object_unref (context->session);
+ if (context->window)
+ g_object_unref (context->window);
g_free (context);
}
@@ -1111,7 +1113,9 @@ session_parse_window (SessionParserContext *context,
GdkRectangle geometry = { -1, -1, 0, 0 };
guint i;
+ g_assert (!context->window);
context->window = ephy_window_new ();
+ g_object_ref (context->window);
for (i = 0; names[i]; i++) {
gulong int_value;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]