aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-chooser.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-11 16:50:02 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-11 16:50:02 +0800
commita72813f2339f5f3dc54ca50d88e9ff3d09a99d8d (patch)
tree09baf20685cbe57fa643f6732a8c126a0681804b /libempathy-gtk/empathy-account-chooser.c
parent0e45a2a7eb9fac4287ff559106a7cd1f02d7b3c2 (diff)
downloadgsoc2013-empathy-a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d.tar
gsoc2013-empathy-a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d.tar.gz
gsoc2013-empathy-a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d.tar.bz2
gsoc2013-empathy-a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d.tar.lz
gsoc2013-empathy-a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d.tar.xz
gsoc2013-empathy-a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d.tar.zst
gsoc2013-empathy-a72813f2339f5f3dc54ca50d88e9ff3d09a99d8d.zip
Fix a leak and simplify account_chooser_set_account_foreach.
svn path=/trunk/; revision=736
Diffstat (limited to 'libempathy-gtk/empathy-account-chooser.c')
-rw-r--r--libempathy-gtk/empathy-account-chooser.c11
1 files changed, 7 insertions, 4 deletions
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);
}