aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-shell.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-10-03 06:02:57 +0800
committerChristian Persch <chpe@src.gnome.org>2005-10-03 06:02:57 +0800
commitbf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee (patch)
tree2592e8e674c53bd7ea10573476386f696af1edde /embed/ephy-embed-shell.c
parentd7fea59666e1aaf5ecc97219538b79932173e135 (diff)
downloadgsoc2013-epiphany-bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee.tar
gsoc2013-epiphany-bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee.tar.gz
gsoc2013-epiphany-bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee.tar.bz2
gsoc2013-epiphany-bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee.tar.lz
gsoc2013-epiphany-bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee.tar.xz
gsoc2013-epiphany-bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee.tar.zst
gsoc2013-epiphany-bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee.zip
Make sure we don't unref NULL objects.
2005-10-03 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed-shell.c: (ephy_embed_shell_dispose): * src/ephy-shell.c: (ephy_shell_dispose): Make sure we don't unref NULL objects.
Diffstat (limited to 'embed/ephy-embed-shell.c')
-rw-r--r--embed/ephy-embed-shell.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index fb7a7d216..acee03562 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -90,27 +90,30 @@ static void
ephy_embed_shell_dispose (GObject *object)
{
EphyEmbedShell *shell = EPHY_EMBED_SHELL (object);
+ EphyEmbedShellPrivate *priv = shell->priv;
- if (shell->priv->downloader_view)
+ if (priv->downloader_view != NULL)
{
LOG ("Unref downloader");
g_object_remove_weak_pointer
- (G_OBJECT(shell->priv->downloader_view),
- (gpointer *) &shell->priv->downloader_view);
- g_object_unref (shell->priv->downloader_view);
+ (G_OBJECT (priv->downloader_view),
+ (gpointer *) &priv->downloader_view);
+ g_object_unref (priv->downloader_view);
+ priv->downloader_view = NULL;
}
- if (shell->priv->favicon_cache)
+ if (priv->favicon_cache != NULL)
{
LOG ("Unref favicon cache");
- g_object_unref (G_OBJECT (shell->priv->favicon_cache));
+ g_object_unref (priv->favicon_cache);
+ priv->favicon_cache = NULL;
}
- if (shell->priv->encodings)
- LOG ("Unref encodings");
+ if (priv->encodings != NULL)
{
LOG ("Unref encodings");
- g_object_unref (G_OBJECT (shell->priv->encodings));
+ g_object_unref (priv->encodings);
+ priv->encodings = NULL;
}
G_OBJECT_CLASS (parent_class)->dispose (object);