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 -6
View File
@@ -2,17 +2,17 @@
/*
* gcal-application.c
* Copyright (C) 2012 Erick Pérez Castellanos <erickpc@gnome.org>
*
*
* gnome-calendar is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* gnome-calendar is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -96,8 +96,7 @@ gcal_application_finalize (GObject *object)
g_return_if_fail (GCAL_IS_APPLICATION (object));
priv = GCAL_APPLICATION (object)->priv;
if (priv->settings != NULL)
g_clear_object (&(priv->settings));
g_clear_object (&(priv->settings));
if (G_OBJECT_CLASS (gcal_application_parent_class)->finalize != NULL)
G_OBJECT_CLASS (gcal_application_parent_class)->finalize (object);
@@ -166,7 +165,7 @@ gcal_application_startup (GApplication *app)
gcal_application_set_app_menu (app);
}
static void
static void
gcal_application_set_app_menu (GApplication *app)
{
GcalApplicationPrivate *priv;