]> git.0d.be Git - empathy.git/commitdiff
account-settings: don't call TpAccount functions if we've not created it yet
authorJonny Lamb <jonnylamb@gnome.org>
Wed, 8 Dec 2010 12:57:45 +0000 (12:57 +0000)
committerJonny Lamb <jonnylamb@gnome.org>
Wed, 8 Dec 2010 13:17:09 +0000 (13:17 +0000)
We're creating the account so the account isn't around yet.

Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
libempathy/empathy-account-settings.c

index abfc8f0ec98624e1ef613788a270ea1b9591c721..e0a24b4d61c118f866124dad14c60af0e20d4cb9 100644 (file)
@@ -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;