aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2010-12-08 20:57:45 +0800
committerJonny Lamb <jonnylamb@gnome.org>2010-12-08 21:17:09 +0800
commit373bf0d7ca7373a45a71e46f161695cc951a7316 (patch)
tree791379cf54e4beb0d32d928e60020157c6ac4d06
parente1db9121d3018495f97bcb41caa3805b3672afbc (diff)
downloadgsoc2013-empathy-373bf0d7ca7373a45a71e46f161695cc951a7316.tar
gsoc2013-empathy-373bf0d7ca7373a45a71e46f161695cc951a7316.tar.gz
gsoc2013-empathy-373bf0d7ca7373a45a71e46f161695cc951a7316.tar.bz2
gsoc2013-empathy-373bf0d7ca7373a45a71e46f161695cc951a7316.tar.lz
gsoc2013-empathy-373bf0d7ca7373a45a71e46f161695cc951a7316.tar.xz
gsoc2013-empathy-373bf0d7ca7373a45a71e46f161695cc951a7316.tar.zst
gsoc2013-empathy-373bf0d7ca7373a45a71e46f161695cc951a7316.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>
-rw-r--r--libempathy/empathy-account-settings.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index abfc8f0ec..e0a24b4d6 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -238,8 +238,12 @@ empathy_account_settings_constructed (GObject *object)
TP_ACCOUNT_FEATURE_STORAGE,
0 };
- tp_proxy_prepare_async (priv->account, features,
- empathy_account_settings_account_ready_cb, self);
+ 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);
}
@@ -540,8 +544,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;