aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-10-17 20:48:28 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-10-17 20:48:28 +0800
commit545e74dd116e05cbb89ce52913ce3bf797629d27 (patch)
tree3831132d6dfc90a9b3efc7f9accf6fa58f5bcaa2
parentadbb7a4526b418e144c8a09e9a2243ca034a5d99 (diff)
downloadgsoc2013-empathy-545e74dd116e05cbb89ce52913ce3bf797629d27.tar
gsoc2013-empathy-545e74dd116e05cbb89ce52913ce3bf797629d27.tar.gz
gsoc2013-empathy-545e74dd116e05cbb89ce52913ce3bf797629d27.tar.bz2
gsoc2013-empathy-545e74dd116e05cbb89ce52913ce3bf797629d27.tar.lz
gsoc2013-empathy-545e74dd116e05cbb89ce52913ce3bf797629d27.tar.xz
gsoc2013-empathy-545e74dd116e05cbb89ce52913ce3bf797629d27.tar.zst
gsoc2013-empathy-545e74dd116e05cbb89ce52913ce3bf797629d27.zip
Do not include accounts which don't have profile.. Also fix a leak.
svn path=/trunk/; revision=1642
-rw-r--r--src/empathy-import-dialog.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/empathy-import-dialog.c b/src/empathy-import-dialog.c
index c93555e81..f8f27f1ce 100644
--- a/src/empathy-import-dialog.c
+++ b/src/empathy-import-dialog.c
@@ -293,9 +293,10 @@ import_dialog_pidgin_load (void)
if (!tp_strdiff ((gchar *) child->name,
PIDGIN_ACCOUNT_TAG_PROTOCOL))
{
+ gchar *content;
const gchar *protocol;
- protocol = (gchar *) xmlNodeGetContent (child);
+ protocol = content = (gchar *) xmlNodeGetContent (child);
if (g_str_has_prefix (protocol, "prpl-"))
protocol += 5;
@@ -306,6 +307,10 @@ import_dialog_pidgin_load (void)
protocol = "groupwise";
data->profile = mc_profile_lookup (protocol);
+ g_free (content);
+
+ if (data->profile == NULL)
+ break;
}
/* Username and IRC server. */
@@ -376,7 +381,7 @@ import_dialog_pidgin_load (void)
/* If we have the needed settings, add the account data to the list,
* otherwise free the data */
- if (g_hash_table_size (data->settings) > 0)
+ if (data->profile != NULL && g_hash_table_size (data->settings) > 0)
accounts = g_list_prepend (accounts, data);
else
import_dialog_account_data_free (data);