From a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 11 Mar 2008 08:50:02 +0000 Subject: Fix a leak and simplify account_chooser_set_account_foreach. svn path=/trunk/; revision=736 --- libempathy-gtk/empathy-account-chooser.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c index b6f6542d7..53fe94c68 100644 --- a/libempathy-gtk/empathy-account-chooser.c +++ b/libempathy-gtk/empathy-account-chooser.c @@ -606,13 +606,16 @@ account_chooser_set_account_foreach (GtkTreeModel *model, gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1); /* Special case so we can make it possible to select the All option */ - if (!data->account && !account) { - equal = TRUE; - } - else if ((data->account && !account) || (!data->account && account)) { + if ((data->account == NULL) != (account == NULL)) { equal = FALSE; + } + else if (data->account == account) { + equal = TRUE; } else { equal = empathy_account_equal (data->account, account); + } + + if (account) { g_object_unref (account); } -- cgit v1.2.3