aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2009-02-23 15:22:15 +0800
committerXan Lopez <xan@src.gnome.org>2009-02-23 15:22:15 +0800
commitc00875cfeb3a0bb5a0fcb93f7ad43dedf24b963e (patch)
treeb796d83a941eb12c15d9f106c26b7d22c058e8b0
parent6d91806986ef863f087676d246f76fb50096b260 (diff)
downloadgsoc2013-epiphany-c00875cfeb3a0bb5a0fcb93f7ad43dedf24b963e.tar.gz
gsoc2013-epiphany-c00875cfeb3a0bb5a0fcb93f7ad43dedf24b963e.tar.zst
gsoc2013-epiphany-c00875cfeb3a0bb5a0fcb93f7ad43dedf24b963e.zip
ephy-zoom-control: release references in dispose, not finalize.
svn path=/trunk/; revision=8809
-rw-r--r--lib/widgets/ephy-zoom-control.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c
index 6a18b1eb4..29ec74714 100644
--- a/lib/widgets/ephy-zoom-control.c
+++ b/lib/widgets/ephy-zoom-control.c
@@ -49,7 +49,7 @@ static guint signals[LAST_SIGNAL];
static void ephy_zoom_control_class_init (EphyZoomControlClass *klass);
static void ephy_zoom_control_init (EphyZoomControl *control);
-static void ephy_zoom_control_finalize (GObject *o);
+static void ephy_zoom_control_dispose (GObject *o);
G_DEFINE_TYPE (EphyZoomControl, ephy_zoom_control, GTK_TYPE_TOOL_ITEM)
@@ -173,7 +173,7 @@ ephy_zoom_control_class_init (EphyZoomControlClass *klass)
object_class->set_property = ephy_zoom_control_set_property;
object_class->get_property = ephy_zoom_control_get_property;
- object_class->finalize = ephy_zoom_control_finalize;
+ object_class->dispose = ephy_zoom_control_dispose;
g_object_class_install_property (object_class,
PROP_ZOOM,
@@ -199,13 +199,17 @@ ephy_zoom_control_class_init (EphyZoomControlClass *klass)
}
static void
-ephy_zoom_control_finalize (GObject *o)
+ephy_zoom_control_dispose (GObject *o)
{
EphyZoomControl *control = EPHY_ZOOM_CONTROL (o);
- g_object_unref (control->priv->combo);
+ if (control->priv->combo)
+ {
+ g_object_unref (control->priv->combo);
+ control->priv->combo = NULL;
+ }
- G_OBJECT_CLASS (ephy_zoom_control_parent_class)->finalize (o);
+ G_OBJECT_CLASS (ephy_zoom_control_parent_class)->dispose (o);
}
/**