aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-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);
}