diff options
author | Xan Lopez <xan@igalia.com> | 2011-11-30 19:55:27 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2011-11-30 19:55:27 +0800 |
commit | 4bd76258dfb086976c7daf1d854aab852c422c85 (patch) | |
tree | ba8d3a54ab4e656ba225469f4f573263fa21b53a /embed | |
parent | 1455bc2e97d8d1d2fe071b7fba99abb3abefb6e6 (diff) | |
download | gsoc2013-epiphany-4bd76258dfb086976c7daf1d854aab852c422c85.tar gsoc2013-epiphany-4bd76258dfb086976c7daf1d854aab852c422c85.tar.gz gsoc2013-epiphany-4bd76258dfb086976c7daf1d854aab852c422c85.tar.bz2 gsoc2013-epiphany-4bd76258dfb086976c7daf1d854aab852c422c85.tar.lz gsoc2013-epiphany-4bd76258dfb086976c7daf1d854aab852c422c85.tar.xz gsoc2013-epiphany-4bd76258dfb086976c7daf1d854aab852c422c85.tar.zst gsoc2013-epiphany-4bd76258dfb086976c7daf1d854aab852c422c85.zip |
ephy-embed: disconnect statusbar timeout on dispose
Otherwise we'll crash when we close windows/tabs too fast.
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed.c | 19 |
1 files 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); |