Commit 22c93bf4 authored by Travis Reitter's avatar Travis Reitter

Take advantage of tp_clear_object().

parent d392ae0a
......@@ -232,8 +232,7 @@ empathy_individual_add_menu_item_new (FolksIndividual *individual)
individual);
out:
if (contact != NULL)
g_object_unref (contact);
tp_clear_object (&contact);
return item;
}
......
......@@ -30,6 +30,7 @@
#include <glib/gi18n.h>
#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/util.h>
#include <folks/folks.h>
#include <libempathy/empathy-contact.h>
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment