[empathy: 20/24] event-manager: use tp_clear_object



commit 05e14d747fd88a260996c406a938a1bfdfbaca8f
Author: Jonny Lamb <jonnylamb gnome org>
Date:   Tue Dec 14 16:33:46 2010 +0000

    event-manager: use tp_clear_object
    
    Signed-off-by: Jonny Lamb <jonnylamb gnome org>

 src/empathy-event-manager.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index f657cae..93656c3 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -166,15 +166,8 @@ event_free (EventPriv *event)
   if (event->autoremove_timeout_id != 0)
     g_source_remove (event->autoremove_timeout_id);
 
-  if (event->public.contact)
-    {
-      g_object_unref (event->public.contact);
-    }
-
-  if (event->public.account)
-    {
-      g_object_unref (event->public.account);
-    }
+  tp_clear_object (&(event->public.contact));
+  tp_clear_object (&(event->public.account));
 
   g_slice_free (EventPriv, event);
 }



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