diff options
author | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-03-11 16:50:02 +0800 |
---|---|---|
committer | xclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-03-11 16:50:02 +0800 |
commit | b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9 (patch) | |
tree | 09baf20685cbe57fa643f6732a8c126a0681804b /libempathy-gtk | |
parent | 4b9d7ec3720a8c288e95e298fab95829554984d6 (diff) | |
download | gsoc2013-empathy-b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9.tar gsoc2013-empathy-b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9.tar.gz gsoc2013-empathy-b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9.tar.bz2 gsoc2013-empathy-b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9.tar.lz gsoc2013-empathy-b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9.tar.xz gsoc2013-empathy-b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9.tar.zst gsoc2013-empathy-b9de1b37f3294a49588fcf3ef0ed6bb3e0e5aca9.zip |
Fix a leak and simplify account_chooser_set_account_foreach.
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@736 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-chooser.c | 11 |
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); } |