[epiphany/gnome-3-12] ephy-title-box: Fix crash when closing second window
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-12] ephy-title-box: Fix crash when closing second window
- Date: Sun, 10 Aug 2014 20:59:34 +0000 (UTC)
commit 3fb260430328704341522ac67a1df432675adeaa
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Jul 21 10:31:42 2014 -0500
ephy-title-box: Fix crash when closing second window
The web view can be destroyed out from under us, so we need to use a
weak reference to determine if it is still alive.
https://bugzilla.gnome.org/show_bug.cgi?id=732784
src/ephy-title-box.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-title-box.c b/src/ephy-title-box.c
index d08c5a8..1225f9e 100644
--- a/src/ephy-title-box.c
+++ b/src/ephy-title-box.c
@@ -552,15 +552,15 @@ ephy_title_box_set_web_view (EphyTitleBox *title_box,
g_clear_object (&priv->title_binding);
g_clear_object (&priv->uri_binding);
- g_object_unref (priv->web_view);
+ g_object_remove_weak_pointer (G_OBJECT (priv->web_view), (gpointer *)&priv->web_view);
}
- priv->web_view = NULL;
+ priv->web_view = web_view;
if (web_view == NULL)
return;
- priv->web_view = g_object_ref (web_view);
+ g_object_add_weak_pointer (G_OBJECT (web_view), (gpointer *)&priv->web_view);
title = webkit_web_view_get_title (web_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]