From b94196fd44f7c6f1c784ab9cb279b3a7558bf8a3 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 26 Jan 2009 10:42:28 +0000 Subject: 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 --- src/empathy-accounts-dialog.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index cc68c1bc3..892f24235 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)); -- cgit v1.2.3