]> git.0d.be Git - empathy.git/commitdiff
Fix a leak and simplify account_chooser_set_account_foreach.
authorXavier Claessens <xclaesse@src.gnome.org>
Tue, 11 Mar 2008 08:50:02 +0000 (08:50 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 11 Mar 2008 08:50:02 +0000 (08:50 +0000)
svn path=/trunk/; revision=736

libempathy-gtk/empathy-account-chooser.c

index b6f6542d7cf41469a4a6b58f759d188dd5c77392..53fe94c689ca4da81d575b6194492066daff272a 100644 (file)
@@ -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);
        }