aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2010-12-08 20:57:45 +0800
committerJonny Lamb <jonnylamb@gnome.org>2011-01-26 21:33:03 +0800
commit95bf4742dea9bdb83dd1bc4cec9730ca6a091c24 (patch)
tree07d5a00c5450266113958ed3f2c16eb9224a6ad8 /libempathy
parent75f150ca6ed3261cf06dad71cb9d0f4584a2eefc (diff)
downloadgsoc2013-empathy-95bf4742dea9bdb83dd1bc4cec9730ca6a091c24.tar
gsoc2013-empathy-95bf4742dea9bdb83dd1bc4cec9730ca6a091c24.tar.gz
gsoc2013-empathy-95bf4742dea9bdb83dd1bc4cec9730ca6a091c24.tar.bz2
gsoc2013-empathy-95bf4742dea9bdb83dd1bc4cec9730ca6a091c24.tar.lz
gsoc2013-empathy-95bf4742dea9bdb83dd1bc4cec9730ca6a091c24.tar.xz
gsoc2013-empathy-95bf4742dea9bdb83dd1bc4cec9730ca6a091c24.tar.zst
gsoc2013-empathy-95bf4742dea9bdb83dd1bc4cec9730ca6a091c24.zip
account-settings: don't call TpAccount functions if we've not created it yet
We're creating the account so the account isn't around yet. Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account-settings.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index fa2819097..8a92dfd96 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -212,8 +212,17 @@ empathy_account_settings_constructed (GObject *object)
if (!priv->ready)
{
- tp_account_prepare_async (priv->account, NULL,
- empathy_account_settings_account_ready_cb, self);
+ GQuark features[] = {
+ TP_ACCOUNT_FEATURE_CORE,
+ TP_ACCOUNT_FEATURE_STORAGE,
+ 0 };
+
+ if (priv->account != NULL)
+ {
+ tp_proxy_prepare_async (priv->account, features,
+ empathy_account_settings_account_ready_cb, self);
+ }
+
tp_g_signal_connect_object (priv->managers, "notify::ready",
G_CALLBACK (empathy_account_settings_managers_ready_cb), object, 0);
}
@@ -503,8 +512,10 @@ empathy_account_settings_check_readyness (EmpathyAccountSettings *self)
}
}
+ /* priv->account won't be a proper account if it's the account
+ * assistant showing this widget. */
if (priv->supports_sasl && !priv->password_retrieved
- && !priv->password_requested)
+ && !priv->password_requested && priv->account != NULL)
{
priv->password_requested = TRUE;