From: Guillaume Desmottes Date: Mon, 26 Jan 2009 10:42:28 +0000 (+0000) Subject: accounts_dialog_button_create_clicked_cb: if, for some reason, mc_account_create... X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=b94196fd44f7c6f1c784ab9cb279b3a7558bf8a3 accounts_dialog_button_create_clicked_cb: if, for some reason, mc_account_create failed, early return instead of crashing From: Guillaume Desmottes svn path=/trunk/; revision=2256 --- diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index cc68c1bc..892f2423 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -823,6 +823,12 @@ accounts_dialog_button_create_clicked_cb (GtkWidget *button, /* Create account */ account = mc_account_create (profile); + if (account == NULL) { + /* We can't display an error to the user as MC doesn't give us + * any clue about the reason of the failure... */ + return; + } + /* To translator: %s is the protocol name */ str = g_strdup_printf (_("New %s account"), mc_profile_get_display_name (profile));