]> git.0d.be Git - empathy.git/commitdiff
account-chooser: allow for a non-prepared account manager (fixes bug #600537)
authorJonny Lamb <jonnylamb@gnome.org>
Tue, 3 Nov 2009 12:09:57 +0000 (12:09 +0000)
committerJonny Lamb <jonnylamb@gnome.org>
Tue, 3 Nov 2009 12:09:57 +0000 (12:09 +0000)
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
libempathy-gtk/empathy-account-chooser.c

index 8256707c067925e2f4905ac55827448dcb22f7d8..7624c2c13686dcfaafe4be5f36245de24dddc156 100644 (file)
@@ -303,6 +303,14 @@ empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
        priv = GET_PRIV (chooser);
 
        account = empathy_account_chooser_dup_account (chooser);
+
+       /* if the returned account is NULL, then the account manager probably
+        * hasn't been prepared yet. It should be safe to return NULL here
+        * though. */
+       if (account == NULL) {
+               return NULL;
+       }
+
        connection = tp_account_get_connection (account);
        g_object_unref (account);