Debarshi's suggestion about g_clear_object use.

Removed if (pointer != null) condition when using
g_clear_object.
This commit is contained in:
Erick Pérez Castellanos
2012-12-01 15:28:53 -05:00
committed by Rene A. Viant Moran
parent e1be309095
commit 1062d3e435
3 changed files with 11 additions and 18 deletions
+5 -10
View File
@@ -246,17 +246,12 @@ gcal_toolbar_finalize (GObject *object)
g_return_if_fail (GCAL_IS_TOOLBAR (object));
priv = GCAL_TOOLBAR (object)->priv;
if (priv->add_button != NULL)
g_clear_object (&(priv->add_button));
if (priv->views_box != NULL)
g_clear_object (&(priv->views_box));
if (priv->right_box != NULL)
g_clear_object (&(priv->right_box));
g_clear_object (&(priv->add_button));
g_clear_object (&(priv->views_box));
g_clear_object (&(priv->right_box));
if (priv->back_button)
g_clear_object (&(priv->back_button));
if (priv->edit_button)
g_clear_object (&(priv->edit_button));
g_clear_object (&(priv->back_button));
g_clear_object (&(priv->edit_button));
G_OBJECT_CLASS (gcal_toolbar_parent_class)->finalize (object);
}