aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-01-19 05:41:32 +0800
committerXan Lopez <xan@igalia.com>2012-01-19 05:41:32 +0800
commitb2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21 (patch)
tree4c44e70c54c6a011e86350e44bbc6aee5503a8d7
parent19171bd7fe27bc87fa68b3272a2715a710ea8c6b (diff)
downloadgsoc2013-epiphany-b2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21.tar
gsoc2013-epiphany-b2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21.tar.gz
gsoc2013-epiphany-b2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21.tar.bz2
gsoc2013-epiphany-b2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21.tar.lz
gsoc2013-epiphany-b2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21.tar.xz
gsoc2013-epiphany-b2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21.tar.zst
gsoc2013-epiphany-b2fff0dd22d8c3dbcb3d88e1d044fdb68b4cea21.zip
ephy-embed: do not listen to status updates after dispose
Otherwise we might crash updating a dead statusbar widget. https://bugzilla.gnome.org/show_bug.cgi?id=668171
-rw-r--r--embed/ephy-embed.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 1d68bdf58..175644902 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -88,6 +88,8 @@ struct _EphyEmbedPrivate
guint pop_statusbar_later_source_id;
guint clear_progress_source_id;
+
+ gulong status_handler_id;
};
G_DEFINE_TYPE (EphyEmbed, ephy_embed, GTK_TYPE_BOX)
@@ -275,6 +277,13 @@ ephy_embed_dispose (GObject *object)
priv->pop_statusbar_later_source_id = 0;
}
+ /* Do not listen to status message notifications anymore, if we try
+ * to update the statusbar after dispose we might crash. */
+ if (priv->status_handler_id) {
+ g_signal_handler_disconnect (priv->web_view, embed->priv->status_handler_id);
+ priv->status_handler_id = 0;
+ }
+
G_OBJECT_CLASS (ephy_embed_parent_class)->dispose (object);
}
@@ -611,9 +620,12 @@ ephy_embed_constructed (GObject *object)
"signal::resource-request-starting", G_CALLBACK (resource_request_starting_cb), embed,
"signal::download-requested", G_CALLBACK (download_requested_cb), embed,
"signal::notify::zoom-level", G_CALLBACK (zoom_changed_cb), embed,
- "signal::notify::status-message", G_CALLBACK (status_message_notify_cb), embed,
NULL);
+ embed->priv->status_handler_id = g_signal_connect (web_view, "notify::status-message",
+ G_CALLBACK (status_message_notify_cb),
+ embed);
+
/* Window features */
window_features = webkit_web_view_get_window_features (web_view);
g_object_connect (window_features,