[epiphany] ephy-title-box: Fix crash when closing second window
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-title-box: Fix crash when closing second window
- Date: Sun, 10 Aug 2014 08:04:29 +0000 (UTC)
commit b7c278ec8d7743c43ad8e8e9a9cf6a6a51d9534a
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 3ccf65e..e682f3a 100644
--- a/src/ephy-title-box.c
+++ b/src/ephy-title-box.c
@@ -551,15 +551,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]