st-widget: Use g_clear_pointer

https://bugzilla.gnome.org/show_bug.cgi?id=710541
This commit is contained in:
Adel Gadllah 2013-10-20 14:00:16 +02:00
parent 0cfa7c1c56
commit 4d1358b7ed

View File

@ -338,17 +338,8 @@ st_widget_dispose (GObject *gobject)
StWidget *actor = ST_WIDGET (gobject);
StWidgetPrivate *priv = ST_WIDGET (actor)->priv;
if (priv->theme)
{
g_object_unref (priv->theme);
priv->theme = NULL;
}
if (priv->theme_node)
{
g_object_unref (priv->theme_node);
priv->theme_node = NULL;
}
g_clear_pointer (&priv->theme, g_object_unref);
g_clear_pointer (&priv->theme_node, g_object_unref);
st_widget_remove_transition (actor);
@ -358,11 +349,7 @@ st_widget_dispose (GObject *gobject)
if (priv->accessible)
priv->accessible = NULL;
if (priv->label_actor)
{
g_object_unref (priv->label_actor);
priv->label_actor = NULL;
}
g_clear_pointer (&priv->label_actor, g_object_unref);
if (priv->texture_file_changed_id != 0)
{