From 4bd76258dfb086976c7daf1d854aab852c422c85 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Wed, 30 Nov 2011 12:55:27 +0100 Subject: ephy-embed: disconnect statusbar timeout on dispose Otherwise we'll crash when we close windows/tabs too fast. --- embed/ephy-embed.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 36c6126b4..e9b442ab4 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -251,23 +251,28 @@ static void ephy_embed_dispose (GObject *object) { EphyEmbed *embed = EPHY_EMBED (object); + EphyEmbedPrivate *priv = embed->priv; - if (embed->priv->inspector_window) - { + if (embed->priv->inspector_window) { WebKitWebInspector *inspector; - inspector = webkit_web_view_get_inspector (embed->priv->web_view); + inspector = webkit_web_view_get_inspector (priv->web_view); g_signal_handlers_disconnect_by_func (inspector, ephy_embed_inspect_show_cb, - embed->priv->inspector_window); + priv->inspector_window); g_signal_handlers_disconnect_by_func (inspector, ephy_embed_inspect_close_cb, - embed->priv->inspector_window); + priv->inspector_window); + + gtk_widget_destroy (GTK_WIDGET (priv->inspector_window)); + priv->inspector_window = NULL; + } - gtk_widget_destroy (GTK_WIDGET (embed->priv->inspector_window)); - embed->priv->inspector_window = NULL; + if (priv->pop_statusbar_later_source_id) { + g_source_remove (priv->pop_statusbar_later_source_id); + priv->pop_statusbar_later_source_id = 0; } G_OBJECT_CLASS (ephy_embed_parent_class)->dispose (object); -- cgit v1.2.3