From 22c93bf49f6a3fdf31496d2c2fd7b7553ee351f1 Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Fri, 9 Jul 2010 13:54:16 -0700 Subject: Take advantage of tp_clear_object(). --- src/empathy-main-window.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/empathy-main-window.c') diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 4c60c87a1..be3ca5498 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -189,9 +190,7 @@ main_window_flash_foreach (GtkTreeModel *model, contact = empathy_contact_dup_from_folks_individual (individual); if (contact != data->event->contact) { - if (contact != NULL) { - g_object_unref (contact); - } + tp_clear_object (&contact); return FALSE; } @@ -221,8 +220,7 @@ main_window_flash_foreach (GtkTreeModel *model, } g_object_unref (individual); - if (contact != NULL) - g_object_unref (contact); + tp_clear_object (&contact); return FALSE; } @@ -355,8 +353,7 @@ main_window_row_activated_cb (EmpathyContactListView *view, g_object_unref (contact); OUT: - if (individual != NULL) - g_object_unref (individual); + tp_clear_object (&individual); } static void -- cgit v1.2.3