aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-shell.c47
1 files changed, 7 insertions, 40 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 9e31af830..2ddbd4fd7 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -95,27 +95,13 @@ ephy_embed_shell_dispose (GObject *object)
EphyEmbedShell *shell = EPHY_EMBED_SHELL (object);
EphyEmbedShellPrivate *priv = shell->priv;
- if (priv->encodings != NULL)
- {
- LOG ("Unref encodings");
- g_object_unref (priv->encodings);
- priv->encodings = NULL;
- }
-
- if (priv->page_setup != NULL)
- {
- g_object_unref (priv->page_setup);
- priv->page_setup = NULL;
- }
-
- if (priv->print_settings != NULL)
- {
- g_object_unref (priv->print_settings);
- priv->print_settings = NULL;
- }
-
- if (priv->frecent_store != NULL)
- g_clear_object (&priv->frecent_store);
+ g_clear_object (&priv->encodings);
+ g_clear_object (&priv->page_setup);
+ g_clear_object (&priv->print_settings);
+ g_clear_object (&priv->frecent_store);
+ g_clear_object (&priv->global_history_service);
+ g_clear_object (&priv->embed_single);
+ g_clear_object (&priv->adblock_manager);
G_OBJECT_CLASS (ephy_embed_shell_parent_class)->dispose (object);
}
@@ -133,25 +119,6 @@ ephy_embed_shell_finalize (GObject *object)
shell->priv->downloads = NULL;
}
- if (shell->priv->global_history_service)
- {
- LOG ("Unref history service");
- g_object_unref (shell->priv->global_history_service);
- }
-
- if (shell->priv->embed_single)
- {
- LOG ("Unref embed single");
- g_object_unref (G_OBJECT (shell->priv->embed_single));
- }
-
- if (shell->priv->adblock_manager != NULL)
- {
- LOG ("Unref adblock manager");
- g_object_unref (shell->priv->adblock_manager);
- shell->priv->adblock_manager = NULL;
- }
-
G_OBJECT_CLASS (ephy_embed_shell_parent_class)->finalize (object);
}