From e6da757a352c686bbb356e6b0559d39c0dbcd75f Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 23 Feb 2015 14:17:32 -0300 Subject: [PATCH] source-dialog: use g_clear_pointer --- src/gcal-source-dialog.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c index 1f0e2b3c..d1f7dc15 100644 --- a/src/gcal-source-dialog.c +++ b/src/gcal-source-dialog.c @@ -312,16 +312,10 @@ response_signal (GtkDialog *dialog, if (priv->mode == GCAL_SOURCE_DIALOG_MODE_CREATE && response_id == GTK_RESPONSE_CANCEL) { if (priv->local_source != NULL) - { - g_object_unref (priv->local_source); - priv->local_source = NULL; - } + g_clear_object (&(priv->local_source)); if (priv->remote_source != NULL) - { - g_object_unref (priv->remote_source); - priv->remote_source = NULL; - } + g_clear_object (&(priv->remote_source)); } }