aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-04-03 20:04:10 +0800
committerChristian Persch <chpe@src.gnome.org>2006-04-03 20:04:10 +0800
commitf4bb56614c249f8c0ccd02cffa0ad162bac4ed50 (patch)
tree83843a347158f3d5eda8fe932d0b54270e45fd33 /embed
parenta9bf8b70bdbe58c6417cad05bb293817bf29c393 (diff)
downloadgsoc2013-epiphany-f4bb56614c249f8c0ccd02cffa0ad162bac4ed50.tar
gsoc2013-epiphany-f4bb56614c249f8c0ccd02cffa0ad162bac4ed50.tar.gz
gsoc2013-epiphany-f4bb56614c249f8c0ccd02cffa0ad162bac4ed50.tar.bz2
gsoc2013-epiphany-f4bb56614c249f8c0ccd02cffa0ad162bac4ed50.tar.lz
gsoc2013-epiphany-f4bb56614c249f8c0ccd02cffa0ad162bac4ed50.tar.xz
gsoc2013-epiphany-f4bb56614c249f8c0ccd02cffa0ad162bac4ed50.tar.zst
gsoc2013-epiphany-f4bb56614c249f8c0ccd02cffa0ad162bac4ed50.zip
Fix status icon reference count.
2006-04-03 Christian Persch <chpe@cvs.gnome.org> * embed/downloader-view.c: Fix status icon reference count.
Diffstat (limited to 'embed')
-rw-r--r--embed/downloader-view.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 9978fd55f..0e6066968 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -206,7 +206,6 @@ show_status_icon (DownloaderView *dv)
DownloaderViewPrivate *priv = dv->priv;
priv->status_icon = gtk_status_icon_new_from_stock (EPHY_STOCK_DOWNLOAD);
- g_object_ref_sink (priv->status_icon);
g_signal_connect_swapped (priv->status_icon, "activate",
G_CALLBACK (show_downloader_cb), dv);
@@ -275,9 +274,15 @@ static void
downloader_view_finalize (GObject *object)
{
DownloaderView *dv = EPHY_DOWNLOADER_VIEW (object);
+ DownloaderViewPrivate *priv = dv->priv;
gboolean idle_unref = dv->priv->idle_unref;
- g_object_unref (dv->priv->status_icon);
+ if (priv->status_icon != NULL)
+ {
+ g_object_unref (priv->status_icon);
+ priv->status_icon = NULL;
+ }
+
g_hash_table_destroy (dv->priv->downloads_hash);
G_OBJECT_CLASS (parent_class)->finalize (object);