aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-23 21:33:30 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-23 21:33:59 +0800
commitdd56cdf3f64b50ada5db0ef6960519bc19815327 (patch)
treec30cbd8977ac336fff457e4290e305c516893b1f
parent2ddd3df3a2764f78874d67f6a0ccc023a3c004de (diff)
downloadgsoc2013-empathy-dd56cdf3f64b50ada5db0ef6960519bc19815327.tar
gsoc2013-empathy-dd56cdf3f64b50ada5db0ef6960519bc19815327.tar.gz
gsoc2013-empathy-dd56cdf3f64b50ada5db0ef6960519bc19815327.tar.bz2
gsoc2013-empathy-dd56cdf3f64b50ada5db0ef6960519bc19815327.tar.lz
gsoc2013-empathy-dd56cdf3f64b50ada5db0ef6960519bc19815327.tar.xz
gsoc2013-empathy-dd56cdf3f64b50ada5db0ef6960519bc19815327.tar.zst
gsoc2013-empathy-dd56cdf3f64b50ada5db0ef6960519bc19815327.zip
accounts-dialog: don't crash if the account is connecting
https://bugzilla.gnome.org/show_bug.cgi?id=676637
-rw-r--r--src/empathy-accounts-dialog.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 4de6911e1..578f998bc 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
{