[evolution-data-server] EBackend: Use g_clear_object() in dispose().



commit 39f1ca01de51487fa806aab077dfed354f515790
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Feb 17 18:18:33 2013 -0500

    EBackend: Use g_clear_object() in dispose().

 libebackend/e-backend.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/libebackend/e-backend.c b/libebackend/e-backend.c
index 6705be7..eb71e3e 100644
--- a/libebackend/e-backend.c
+++ b/libebackend/e-backend.c
@@ -144,15 +144,8 @@ backend_dispose (GObject *object)
 
        priv = E_BACKEND_GET_PRIVATE (object);
 
-       if (priv->source != NULL) {
-               g_object_unref (priv->source);
-               priv->source = NULL;
-       }
-
-       if (priv->prompter) {
-               g_object_unref (priv->prompter);
-               priv->prompter = NULL;
-       }
+       g_clear_object (&priv->source);
+       g_clear_object (&priv->prompter);
 
        /* Chain up to parent's dispose() method. */
        G_OBJECT_CLASS (e_backend_parent_class)->dispose (object);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]