[empathy] accounts-dialog: don't crash if the account is connecting
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] accounts-dialog: don't crash if the account is connecting
- Date: Thu, 24 May 2012 07:38:17 +0000 (UTC)
commit dd56cdf3f64b50ada5db0ef6960519bc19815327
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed May 23 15:33:30 2012 +0200
accounts-dialog: don't crash if the account is connecting
https://bugzilla.gnome.org/show_bug.cgi?id=676637
src/empathy-accounts-dialog.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 4de6911..578f998 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -785,14 +785,13 @@ account_dialog_show_contact_details_failed (EmpathyAccountsDialog *dialog,
static void
create_contact_info_editor (EmpathyAccountsDialog *self,
- TpConnection *conn)
+ TpContact *tp_contact)
{
EmpathyAccountsDialogPriv *priv = GET_PRIV (self);
GtkWidget *editor, *alig;
EmpathyContact *contact;
- contact = empathy_contact_dup_from_tp_contact (
- tp_connection_get_self_contact (conn));
+ contact = empathy_contact_dup_from_tp_contact (tp_contact);
alig = gtk_alignment_new (0.5, 0, 1, 1);
@@ -819,6 +818,7 @@ account_dialog_create_dialog_content (EmpathyAccountsDialog *dialog,
const gchar *icon_name;
TpAccount *account;
TpConnection *conn = NULL;
+ TpContact *contact = NULL;
GtkWidget *bbox, *button;
account = empathy_account_settings_get_account (settings);
@@ -835,7 +835,12 @@ account_dialog_create_dialog_content (EmpathyAccountsDialog *dialog,
if (conn != NULL &&
tp_proxy_get_invalidated (conn) == NULL)
{
- create_contact_info_editor (dialog, conn);
+ contact = tp_connection_get_self_contact (conn);
+ }
+
+ if (contact != NULL)
+ {
+ create_contact_info_editor (dialog, contact);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]