From d06aae89f84d7bee74815879047e049aa99f39d7 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Tue, 3 Nov 2009 12:09:57 +0000 Subject: account-chooser: allow for a non-prepared account manager (fixes bug #600537) Signed-off-by: Jonny Lamb --- libempathy-gtk/empathy-account-chooser.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libempathy-gtk/empathy-account-chooser.c') diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c index 8256707c0..7624c2c13 100644 --- a/libempathy-gtk/empathy-account-chooser.c +++ b/libempathy-gtk/empathy-account-chooser.c @@ -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); -- cgit v1.2.3